| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909 |
- // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
- // Package codecommit provides a client for AWS CodeCommit.
- package codecommit
- import (
- "time"
- "github.com/aws/aws-sdk-go/aws/awsutil"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/private/protocol"
- "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
- )
- const opBatchGetRepositories = "BatchGetRepositories"
- // BatchGetRepositoriesRequest generates a "aws/request.Request" representing the
- // client's request for the BatchGetRepositories operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the BatchGetRepositories method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the BatchGetRepositoriesRequest method.
- // req, resp := client.BatchGetRepositoriesRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CodeCommit) BatchGetRepositoriesRequest(input *BatchGetRepositoriesInput) (req *request.Request, output *BatchGetRepositoriesOutput) {
- op := &request.Operation{
- Name: opBatchGetRepositories,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &BatchGetRepositoriesInput{}
- }
- req = c.newRequest(op, input, output)
- output = &BatchGetRepositoriesOutput{}
- req.Data = output
- return
- }
- // Returns information about one or more repositories.
- //
- // The description field for a repository accepts all HTML characters and all
- // valid Unicode characters. Applications that do not HTML-encode the description
- // and display it in a web page could expose users to potentially malicious
- // code. Make sure that you HTML-encode the description field in any application
- // that uses this API to display the repository description on a web page.
- func (c *CodeCommit) BatchGetRepositories(input *BatchGetRepositoriesInput) (*BatchGetRepositoriesOutput, error) {
- req, out := c.BatchGetRepositoriesRequest(input)
- err := req.Send()
- return out, err
- }
- const opCreateBranch = "CreateBranch"
- // CreateBranchRequest generates a "aws/request.Request" representing the
- // client's request for the CreateBranch operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the CreateBranch method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the CreateBranchRequest method.
- // req, resp := client.CreateBranchRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CodeCommit) CreateBranchRequest(input *CreateBranchInput) (req *request.Request, output *CreateBranchOutput) {
- op := &request.Operation{
- Name: opCreateBranch,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &CreateBranchInput{}
- }
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
- req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
- output = &CreateBranchOutput{}
- req.Data = output
- return
- }
- // Creates a new branch in a repository and points the branch to a commit.
- //
- // Calling the create branch operation does not set a repository's default
- // branch. To do this, call the update default branch operation.
- func (c *CodeCommit) CreateBranch(input *CreateBranchInput) (*CreateBranchOutput, error) {
- req, out := c.CreateBranchRequest(input)
- err := req.Send()
- return out, err
- }
- const opCreateRepository = "CreateRepository"
- // CreateRepositoryRequest generates a "aws/request.Request" representing the
- // client's request for the CreateRepository operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the CreateRepository method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the CreateRepositoryRequest method.
- // req, resp := client.CreateRepositoryRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CodeCommit) CreateRepositoryRequest(input *CreateRepositoryInput) (req *request.Request, output *CreateRepositoryOutput) {
- op := &request.Operation{
- Name: opCreateRepository,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &CreateRepositoryInput{}
- }
- req = c.newRequest(op, input, output)
- output = &CreateRepositoryOutput{}
- req.Data = output
- return
- }
- // Creates a new, empty repository.
- func (c *CodeCommit) CreateRepository(input *CreateRepositoryInput) (*CreateRepositoryOutput, error) {
- req, out := c.CreateRepositoryRequest(input)
- err := req.Send()
- return out, err
- }
- const opDeleteRepository = "DeleteRepository"
- // DeleteRepositoryRequest generates a "aws/request.Request" representing the
- // client's request for the DeleteRepository operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the DeleteRepository method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the DeleteRepositoryRequest method.
- // req, resp := client.DeleteRepositoryRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CodeCommit) DeleteRepositoryRequest(input *DeleteRepositoryInput) (req *request.Request, output *DeleteRepositoryOutput) {
- op := &request.Operation{
- Name: opDeleteRepository,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DeleteRepositoryInput{}
- }
- req = c.newRequest(op, input, output)
- output = &DeleteRepositoryOutput{}
- req.Data = output
- return
- }
- // Deletes a repository. If a specified repository was already deleted, a null
- // repository ID will be returned.
- //
- // Deleting a repository also deletes all associated objects and metadata.
- // After a repository is deleted, all future push calls to the deleted repository
- // will fail.
- func (c *CodeCommit) DeleteRepository(input *DeleteRepositoryInput) (*DeleteRepositoryOutput, error) {
- req, out := c.DeleteRepositoryRequest(input)
- err := req.Send()
- return out, err
- }
- const opGetBranch = "GetBranch"
- // GetBranchRequest generates a "aws/request.Request" representing the
- // client's request for the GetBranch operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the GetBranch method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the GetBranchRequest method.
- // req, resp := client.GetBranchRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CodeCommit) GetBranchRequest(input *GetBranchInput) (req *request.Request, output *GetBranchOutput) {
- op := &request.Operation{
- Name: opGetBranch,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &GetBranchInput{}
- }
- req = c.newRequest(op, input, output)
- output = &GetBranchOutput{}
- req.Data = output
- return
- }
- // Returns information about a repository branch, including its name and the
- // last commit ID.
- func (c *CodeCommit) GetBranch(input *GetBranchInput) (*GetBranchOutput, error) {
- req, out := c.GetBranchRequest(input)
- err := req.Send()
- return out, err
- }
- const opGetCommit = "GetCommit"
- // GetCommitRequest generates a "aws/request.Request" representing the
- // client's request for the GetCommit operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the GetCommit method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the GetCommitRequest method.
- // req, resp := client.GetCommitRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CodeCommit) GetCommitRequest(input *GetCommitInput) (req *request.Request, output *GetCommitOutput) {
- op := &request.Operation{
- Name: opGetCommit,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &GetCommitInput{}
- }
- req = c.newRequest(op, input, output)
- output = &GetCommitOutput{}
- req.Data = output
- return
- }
- // Returns information about a commit, including commit message and committer
- // information.
- func (c *CodeCommit) GetCommit(input *GetCommitInput) (*GetCommitOutput, error) {
- req, out := c.GetCommitRequest(input)
- err := req.Send()
- return out, err
- }
- const opGetRepository = "GetRepository"
- // GetRepositoryRequest generates a "aws/request.Request" representing the
- // client's request for the GetRepository operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the GetRepository method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the GetRepositoryRequest method.
- // req, resp := client.GetRepositoryRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CodeCommit) GetRepositoryRequest(input *GetRepositoryInput) (req *request.Request, output *GetRepositoryOutput) {
- op := &request.Operation{
- Name: opGetRepository,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &GetRepositoryInput{}
- }
- req = c.newRequest(op, input, output)
- output = &GetRepositoryOutput{}
- req.Data = output
- return
- }
- // Returns information about a repository.
- //
- // The description field for a repository accepts all HTML characters and all
- // valid Unicode characters. Applications that do not HTML-encode the description
- // and display it in a web page could expose users to potentially malicious
- // code. Make sure that you HTML-encode the description field in any application
- // that uses this API to display the repository description on a web page.
- func (c *CodeCommit) GetRepository(input *GetRepositoryInput) (*GetRepositoryOutput, error) {
- req, out := c.GetRepositoryRequest(input)
- err := req.Send()
- return out, err
- }
- const opGetRepositoryTriggers = "GetRepositoryTriggers"
- // GetRepositoryTriggersRequest generates a "aws/request.Request" representing the
- // client's request for the GetRepositoryTriggers operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the GetRepositoryTriggers method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the GetRepositoryTriggersRequest method.
- // req, resp := client.GetRepositoryTriggersRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CodeCommit) GetRepositoryTriggersRequest(input *GetRepositoryTriggersInput) (req *request.Request, output *GetRepositoryTriggersOutput) {
- op := &request.Operation{
- Name: opGetRepositoryTriggers,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &GetRepositoryTriggersInput{}
- }
- req = c.newRequest(op, input, output)
- output = &GetRepositoryTriggersOutput{}
- req.Data = output
- return
- }
- // Gets information about triggers configured for a repository.
- func (c *CodeCommit) GetRepositoryTriggers(input *GetRepositoryTriggersInput) (*GetRepositoryTriggersOutput, error) {
- req, out := c.GetRepositoryTriggersRequest(input)
- err := req.Send()
- return out, err
- }
- const opListBranches = "ListBranches"
- // ListBranchesRequest generates a "aws/request.Request" representing the
- // client's request for the ListBranches operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the ListBranches method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the ListBranchesRequest method.
- // req, resp := client.ListBranchesRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CodeCommit) ListBranchesRequest(input *ListBranchesInput) (req *request.Request, output *ListBranchesOutput) {
- op := &request.Operation{
- Name: opListBranches,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"nextToken"},
- OutputTokens: []string{"nextToken"},
- LimitToken: "",
- TruncationToken: "",
- },
- }
- if input == nil {
- input = &ListBranchesInput{}
- }
- req = c.newRequest(op, input, output)
- output = &ListBranchesOutput{}
- req.Data = output
- return
- }
- // Gets information about one or more branches in a repository.
- func (c *CodeCommit) ListBranches(input *ListBranchesInput) (*ListBranchesOutput, error) {
- req, out := c.ListBranchesRequest(input)
- err := req.Send()
- return out, err
- }
- // ListBranchesPages iterates over the pages of a ListBranches operation,
- // calling the "fn" function with the response data for each page. To stop
- // iterating, return false from the fn function.
- //
- // See ListBranches method for more information on how to use this operation.
- //
- // Note: This operation can generate multiple requests to a service.
- //
- // // Example iterating over at most 3 pages of a ListBranches operation.
- // pageNum := 0
- // err := client.ListBranchesPages(params,
- // func(page *ListBranchesOutput, lastPage bool) bool {
- // pageNum++
- // fmt.Println(page)
- // return pageNum <= 3
- // })
- //
- func (c *CodeCommit) ListBranchesPages(input *ListBranchesInput, fn func(p *ListBranchesOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.ListBranchesRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*ListBranchesOutput), lastPage)
- })
- }
- const opListRepositories = "ListRepositories"
- // ListRepositoriesRequest generates a "aws/request.Request" representing the
- // client's request for the ListRepositories operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the ListRepositories method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the ListRepositoriesRequest method.
- // req, resp := client.ListRepositoriesRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CodeCommit) ListRepositoriesRequest(input *ListRepositoriesInput) (req *request.Request, output *ListRepositoriesOutput) {
- op := &request.Operation{
- Name: opListRepositories,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"nextToken"},
- OutputTokens: []string{"nextToken"},
- LimitToken: "",
- TruncationToken: "",
- },
- }
- if input == nil {
- input = &ListRepositoriesInput{}
- }
- req = c.newRequest(op, input, output)
- output = &ListRepositoriesOutput{}
- req.Data = output
- return
- }
- // Gets information about one or more repositories.
- func (c *CodeCommit) ListRepositories(input *ListRepositoriesInput) (*ListRepositoriesOutput, error) {
- req, out := c.ListRepositoriesRequest(input)
- err := req.Send()
- return out, err
- }
- // ListRepositoriesPages iterates over the pages of a ListRepositories operation,
- // calling the "fn" function with the response data for each page. To stop
- // iterating, return false from the fn function.
- //
- // See ListRepositories method for more information on how to use this operation.
- //
- // Note: This operation can generate multiple requests to a service.
- //
- // // Example iterating over at most 3 pages of a ListRepositories operation.
- // pageNum := 0
- // err := client.ListRepositoriesPages(params,
- // func(page *ListRepositoriesOutput, lastPage bool) bool {
- // pageNum++
- // fmt.Println(page)
- // return pageNum <= 3
- // })
- //
- func (c *CodeCommit) ListRepositoriesPages(input *ListRepositoriesInput, fn func(p *ListRepositoriesOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.ListRepositoriesRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*ListRepositoriesOutput), lastPage)
- })
- }
- const opPutRepositoryTriggers = "PutRepositoryTriggers"
- // PutRepositoryTriggersRequest generates a "aws/request.Request" representing the
- // client's request for the PutRepositoryTriggers operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the PutRepositoryTriggers method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the PutRepositoryTriggersRequest method.
- // req, resp := client.PutRepositoryTriggersRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CodeCommit) PutRepositoryTriggersRequest(input *PutRepositoryTriggersInput) (req *request.Request, output *PutRepositoryTriggersOutput) {
- op := &request.Operation{
- Name: opPutRepositoryTriggers,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &PutRepositoryTriggersInput{}
- }
- req = c.newRequest(op, input, output)
- output = &PutRepositoryTriggersOutput{}
- req.Data = output
- return
- }
- // Replaces all triggers for a repository. This can be used to create or delete
- // triggers.
- func (c *CodeCommit) PutRepositoryTriggers(input *PutRepositoryTriggersInput) (*PutRepositoryTriggersOutput, error) {
- req, out := c.PutRepositoryTriggersRequest(input)
- err := req.Send()
- return out, err
- }
- const opTestRepositoryTriggers = "TestRepositoryTriggers"
- // TestRepositoryTriggersRequest generates a "aws/request.Request" representing the
- // client's request for the TestRepositoryTriggers operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the TestRepositoryTriggers method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the TestRepositoryTriggersRequest method.
- // req, resp := client.TestRepositoryTriggersRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CodeCommit) TestRepositoryTriggersRequest(input *TestRepositoryTriggersInput) (req *request.Request, output *TestRepositoryTriggersOutput) {
- op := &request.Operation{
- Name: opTestRepositoryTriggers,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &TestRepositoryTriggersInput{}
- }
- req = c.newRequest(op, input, output)
- output = &TestRepositoryTriggersOutput{}
- req.Data = output
- return
- }
- // Tests the functionality of repository triggers by sending information to
- // the trigger target. If real data is available in the repository, the test
- // will send data from the last commit. If no data is available, sample data
- // will be generated.
- func (c *CodeCommit) TestRepositoryTriggers(input *TestRepositoryTriggersInput) (*TestRepositoryTriggersOutput, error) {
- req, out := c.TestRepositoryTriggersRequest(input)
- err := req.Send()
- return out, err
- }
- const opUpdateDefaultBranch = "UpdateDefaultBranch"
- // UpdateDefaultBranchRequest generates a "aws/request.Request" representing the
- // client's request for the UpdateDefaultBranch operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the UpdateDefaultBranch method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the UpdateDefaultBranchRequest method.
- // req, resp := client.UpdateDefaultBranchRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CodeCommit) UpdateDefaultBranchRequest(input *UpdateDefaultBranchInput) (req *request.Request, output *UpdateDefaultBranchOutput) {
- op := &request.Operation{
- Name: opUpdateDefaultBranch,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &UpdateDefaultBranchInput{}
- }
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
- req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
- output = &UpdateDefaultBranchOutput{}
- req.Data = output
- return
- }
- // Sets or changes the default branch name for the specified repository.
- //
- // If you use this operation to change the default branch name to the current
- // default branch name, a success message is returned even though the default
- // branch did not change.
- func (c *CodeCommit) UpdateDefaultBranch(input *UpdateDefaultBranchInput) (*UpdateDefaultBranchOutput, error) {
- req, out := c.UpdateDefaultBranchRequest(input)
- err := req.Send()
- return out, err
- }
- const opUpdateRepositoryDescription = "UpdateRepositoryDescription"
- // UpdateRepositoryDescriptionRequest generates a "aws/request.Request" representing the
- // client's request for the UpdateRepositoryDescription operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the UpdateRepositoryDescription method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the UpdateRepositoryDescriptionRequest method.
- // req, resp := client.UpdateRepositoryDescriptionRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CodeCommit) UpdateRepositoryDescriptionRequest(input *UpdateRepositoryDescriptionInput) (req *request.Request, output *UpdateRepositoryDescriptionOutput) {
- op := &request.Operation{
- Name: opUpdateRepositoryDescription,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &UpdateRepositoryDescriptionInput{}
- }
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
- req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
- output = &UpdateRepositoryDescriptionOutput{}
- req.Data = output
- return
- }
- // Sets or changes the comment or description for a repository.
- //
- // The description field for a repository accepts all HTML characters and all
- // valid Unicode characters. Applications that do not HTML-encode the description
- // and display it in a web page could expose users to potentially malicious
- // code. Make sure that you HTML-encode the description field in any application
- // that uses this API to display the repository description on a web page.
- func (c *CodeCommit) UpdateRepositoryDescription(input *UpdateRepositoryDescriptionInput) (*UpdateRepositoryDescriptionOutput, error) {
- req, out := c.UpdateRepositoryDescriptionRequest(input)
- err := req.Send()
- return out, err
- }
- const opUpdateRepositoryName = "UpdateRepositoryName"
- // UpdateRepositoryNameRequest generates a "aws/request.Request" representing the
- // client's request for the UpdateRepositoryName operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the UpdateRepositoryName method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the UpdateRepositoryNameRequest method.
- // req, resp := client.UpdateRepositoryNameRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CodeCommit) UpdateRepositoryNameRequest(input *UpdateRepositoryNameInput) (req *request.Request, output *UpdateRepositoryNameOutput) {
- op := &request.Operation{
- Name: opUpdateRepositoryName,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &UpdateRepositoryNameInput{}
- }
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
- req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
- output = &UpdateRepositoryNameOutput{}
- req.Data = output
- return
- }
- // Renames a repository. The repository name must be unique across the calling
- // AWS account. In addition, repository names are limited to 100 alphanumeric,
- // dash, and underscore characters, and cannot include certain characters. The
- // suffix ".git" is prohibited. For a full description of the limits on repository
- // names, see Limits (http://docs.aws.amazon.com/codecommit/latest/userguide/limits.html)
- // in the AWS CodeCommit User Guide.
- func (c *CodeCommit) UpdateRepositoryName(input *UpdateRepositoryNameInput) (*UpdateRepositoryNameOutput, error) {
- req, out := c.UpdateRepositoryNameRequest(input)
- err := req.Send()
- return out, err
- }
- // Represents the input of a batch get repositories operation.
- type BatchGetRepositoriesInput struct {
- _ struct{} `type:"structure"`
- // The names of the repositories to get information about.
- RepositoryNames []*string `locationName:"repositoryNames" type:"list" required:"true"`
- }
- // String returns the string representation
- func (s BatchGetRepositoriesInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s BatchGetRepositoriesInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *BatchGetRepositoriesInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "BatchGetRepositoriesInput"}
- if s.RepositoryNames == nil {
- invalidParams.Add(request.NewErrParamRequired("RepositoryNames"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // Represents the output of a batch get repositories operation.
- type BatchGetRepositoriesOutput struct {
- _ struct{} `type:"structure"`
- // A list of repositories returned by the batch get repositories operation.
- Repositories []*RepositoryMetadata `locationName:"repositories" type:"list"`
- // Returns a list of repository names for which information could not be found.
- RepositoriesNotFound []*string `locationName:"repositoriesNotFound" type:"list"`
- }
- // String returns the string representation
- func (s BatchGetRepositoriesOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s BatchGetRepositoriesOutput) GoString() string {
- return s.String()
- }
- // Returns information about a branch.
- type BranchInfo struct {
- _ struct{} `type:"structure"`
- // The name of the branch.
- BranchName *string `locationName:"branchName" min:"1" type:"string"`
- // The ID of the last commit made to the branch.
- CommitId *string `locationName:"commitId" type:"string"`
- }
- // String returns the string representation
- func (s BranchInfo) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s BranchInfo) GoString() string {
- return s.String()
- }
- // Returns information about a specific commit.
- type Commit struct {
- _ struct{} `type:"structure"`
- // Any additional data associated with the specified commit.
- AdditionalData *string `locationName:"additionalData" type:"string"`
- // Information about the author of the specified commit.
- Author *UserInfo `locationName:"author" type:"structure"`
- // Information about the person who committed the specified commit, also known
- // as the committer. For more information about the difference between an author
- // and a committer in Git, see Viewing the Commit History (http://git-scm.com/book/ch2-3.html)
- // in Pro Git by Scott Chacon and Ben Straub.
- Committer *UserInfo `locationName:"committer" type:"structure"`
- // The message associated with the specified commit.
- Message *string `locationName:"message" type:"string"`
- // The parent list for the specified commit.
- Parents []*string `locationName:"parents" type:"list"`
- // Tree information for the specified commit.
- TreeId *string `locationName:"treeId" type:"string"`
- }
- // String returns the string representation
- func (s Commit) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s Commit) GoString() string {
- return s.String()
- }
- // Represents the input of a create branch operation.
- type CreateBranchInput struct {
- _ struct{} `type:"structure"`
- // The name of the new branch to create.
- BranchName *string `locationName:"branchName" min:"1" type:"string" required:"true"`
- // The ID of the commit to point the new branch to.
- CommitId *string `locationName:"commitId" type:"string" required:"true"`
- // The name of the repository in which you want to create the new branch.
- RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s CreateBranchInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateBranchInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *CreateBranchInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateBranchInput"}
- if s.BranchName == nil {
- invalidParams.Add(request.NewErrParamRequired("BranchName"))
- }
- if s.BranchName != nil && len(*s.BranchName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("BranchName", 1))
- }
- if s.CommitId == nil {
- invalidParams.Add(request.NewErrParamRequired("CommitId"))
- }
- if s.RepositoryName == nil {
- invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
- }
- if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type CreateBranchOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s CreateBranchOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateBranchOutput) GoString() string {
- return s.String()
- }
- // Represents the input of a create repository operation.
- type CreateRepositoryInput struct {
- _ struct{} `type:"structure"`
- // A comment or description about the new repository.
- //
- // The description field for a repository accepts all HTML characters and all
- // valid Unicode characters. Applications that do not HTML-encode the description
- // and display it in a web page could expose users to potentially malicious
- // code. Make sure that you HTML-encode the description field in any application
- // that uses this API to display the repository description on a web page.
- RepositoryDescription *string `locationName:"repositoryDescription" type:"string"`
- // The name of the new repository to be created.
- //
- // The repository name must be unique across the calling AWS account. In addition,
- // repository names are limited to 100 alphanumeric, dash, and underscore characters,
- // and cannot include certain characters. For a full description of the limits
- // on repository names, see Limits (http://docs.aws.amazon.com/codecommit/latest/userguide/limits.html)
- // in the AWS CodeCommit User Guide. The suffix ".git" is prohibited.
- RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s CreateRepositoryInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateRepositoryInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *CreateRepositoryInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateRepositoryInput"}
- if s.RepositoryName == nil {
- invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
- }
- if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // Represents the output of a create repository operation.
- type CreateRepositoryOutput struct {
- _ struct{} `type:"structure"`
- // Information about the newly created repository.
- RepositoryMetadata *RepositoryMetadata `locationName:"repositoryMetadata" type:"structure"`
- }
- // String returns the string representation
- func (s CreateRepositoryOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateRepositoryOutput) GoString() string {
- return s.String()
- }
- // Represents the input of a delete repository operation.
- type DeleteRepositoryInput struct {
- _ struct{} `type:"structure"`
- // The name of the repository to delete.
- RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DeleteRepositoryInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteRepositoryInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DeleteRepositoryInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteRepositoryInput"}
- if s.RepositoryName == nil {
- invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
- }
- if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // Represents the output of a delete repository operation.
- type DeleteRepositoryOutput struct {
- _ struct{} `type:"structure"`
- // The ID of the repository that was deleted.
- RepositoryId *string `locationName:"repositoryId" type:"string"`
- }
- // String returns the string representation
- func (s DeleteRepositoryOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteRepositoryOutput) GoString() string {
- return s.String()
- }
- // Represents the input of a get branch operation.
- type GetBranchInput struct {
- _ struct{} `type:"structure"`
- // The name of the branch for which you want to retrieve information.
- BranchName *string `locationName:"branchName" min:"1" type:"string"`
- // The name of the repository that contains the branch for which you want to
- // retrieve information.
- RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"`
- }
- // String returns the string representation
- func (s GetBranchInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetBranchInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetBranchInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBranchInput"}
- if s.BranchName != nil && len(*s.BranchName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("BranchName", 1))
- }
- if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // Represents the output of a get branch operation.
- type GetBranchOutput struct {
- _ struct{} `type:"structure"`
- // The name of the branch.
- Branch *BranchInfo `locationName:"branch" type:"structure"`
- }
- // String returns the string representation
- func (s GetBranchOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetBranchOutput) GoString() string {
- return s.String()
- }
- // Represents the input of a get commit operation.
- type GetCommitInput struct {
- _ struct{} `type:"structure"`
- // The commit ID.
- CommitId *string `locationName:"commitId" type:"string" required:"true"`
- // The name of the repository to which the commit was made.
- RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s GetCommitInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetCommitInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetCommitInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetCommitInput"}
- if s.CommitId == nil {
- invalidParams.Add(request.NewErrParamRequired("CommitId"))
- }
- if s.RepositoryName == nil {
- invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
- }
- if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // Represents the output of a get commit operation.
- type GetCommitOutput struct {
- _ struct{} `type:"structure"`
- // Information about the specified commit.
- Commit *Commit `locationName:"commit" type:"structure" required:"true"`
- }
- // String returns the string representation
- func (s GetCommitOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetCommitOutput) GoString() string {
- return s.String()
- }
- // Represents the input of a get repository operation.
- type GetRepositoryInput struct {
- _ struct{} `type:"structure"`
- // The name of the repository to get information about.
- RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s GetRepositoryInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetRepositoryInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetRepositoryInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetRepositoryInput"}
- if s.RepositoryName == nil {
- invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
- }
- if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // Represents the output of a get repository operation.
- type GetRepositoryOutput struct {
- _ struct{} `type:"structure"`
- // Information about the repository.
- RepositoryMetadata *RepositoryMetadata `locationName:"repositoryMetadata" type:"structure"`
- }
- // String returns the string representation
- func (s GetRepositoryOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetRepositoryOutput) GoString() string {
- return s.String()
- }
- // Represents the input of a get repository triggers operation.
- type GetRepositoryTriggersInput struct {
- _ struct{} `type:"structure"`
- // The name of the repository for which the trigger is configured.
- RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"`
- }
- // String returns the string representation
- func (s GetRepositoryTriggersInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetRepositoryTriggersInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetRepositoryTriggersInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetRepositoryTriggersInput"}
- if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // Represents the output of a get repository triggers operation.
- type GetRepositoryTriggersOutput struct {
- _ struct{} `type:"structure"`
- // The system-generated unique ID for the trigger.
- ConfigurationId *string `locationName:"configurationId" type:"string"`
- // The JSON block of configuration information for each trigger.
- Triggers []*RepositoryTrigger `locationName:"triggers" type:"list"`
- }
- // String returns the string representation
- func (s GetRepositoryTriggersOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetRepositoryTriggersOutput) GoString() string {
- return s.String()
- }
- // Represents the input of a list branches operation.
- type ListBranchesInput struct {
- _ struct{} `type:"structure"`
- // An enumeration token that allows the operation to batch the results.
- NextToken *string `locationName:"nextToken" type:"string"`
- // The name of the repository that contains the branches.
- RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s ListBranchesInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListBranchesInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ListBranchesInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListBranchesInput"}
- if s.RepositoryName == nil {
- invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
- }
- if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // Represents the output of a list branches operation.
- type ListBranchesOutput struct {
- _ struct{} `type:"structure"`
- // The list of branch names.
- Branches []*string `locationName:"branches" type:"list"`
- // An enumeration token that returns the batch of the results.
- NextToken *string `locationName:"nextToken" type:"string"`
- }
- // String returns the string representation
- func (s ListBranchesOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListBranchesOutput) GoString() string {
- return s.String()
- }
- // Represents the input of a list repositories operation.
- type ListRepositoriesInput struct {
- _ struct{} `type:"structure"`
- // An enumeration token that allows the operation to batch the results of the
- // operation. Batch sizes are 1,000 for list repository operations. When the
- // client sends the token back to AWS CodeCommit, another page of 1,000 records
- // is retrieved.
- NextToken *string `locationName:"nextToken" type:"string"`
- // The order in which to sort the results of a list repositories operation.
- Order *string `locationName:"order" type:"string" enum:"OrderEnum"`
- // The criteria used to sort the results of a list repositories operation.
- SortBy *string `locationName:"sortBy" type:"string" enum:"SortByEnum"`
- }
- // String returns the string representation
- func (s ListRepositoriesInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListRepositoriesInput) GoString() string {
- return s.String()
- }
- // Represents the output of a list repositories operation.
- type ListRepositoriesOutput struct {
- _ struct{} `type:"structure"`
- // An enumeration token that allows the operation to batch the results of the
- // operation. Batch sizes are 1,000 for list repository operations. When the
- // client sends the token back to AWS CodeCommit, another page of 1,000 records
- // is retrieved.
- NextToken *string `locationName:"nextToken" type:"string"`
- // Lists the repositories called by the list repositories operation.
- Repositories []*RepositoryNameIdPair `locationName:"repositories" type:"list"`
- }
- // String returns the string representation
- func (s ListRepositoriesOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListRepositoriesOutput) GoString() string {
- return s.String()
- }
- // Represents the input ofa put repository triggers operation.
- type PutRepositoryTriggersInput struct {
- _ struct{} `type:"structure"`
- // The name of the repository where you want to create or update the trigger.
- RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"`
- // The JSON block of configuration information for each trigger.
- Triggers []*RepositoryTrigger `locationName:"triggers" type:"list"`
- }
- // String returns the string representation
- func (s PutRepositoryTriggersInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s PutRepositoryTriggersInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *PutRepositoryTriggersInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutRepositoryTriggersInput"}
- if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // Represents the output of a put repository triggers operation.
- type PutRepositoryTriggersOutput struct {
- _ struct{} `type:"structure"`
- // The system-generated unique ID for the create or update operation.
- ConfigurationId *string `locationName:"configurationId" type:"string"`
- }
- // String returns the string representation
- func (s PutRepositoryTriggersOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s PutRepositoryTriggersOutput) GoString() string {
- return s.String()
- }
- // Information about a repository.
- type RepositoryMetadata struct {
- _ struct{} `type:"structure"`
- // The ID of the AWS account associated with the repository.
- AccountId *string `locationName:"accountId" type:"string"`
- // The Amazon Resource Name (ARN) of the repository.
- Arn *string `type:"string"`
- // The URL to use for cloning the repository over HTTPS.
- CloneUrlHttp *string `locationName:"cloneUrlHttp" type:"string"`
- // The URL to use for cloning the repository over SSH.
- CloneUrlSsh *string `locationName:"cloneUrlSsh" type:"string"`
- // The date and time the repository was created, in timestamp format.
- CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"`
- // The repository's default branch name.
- DefaultBranch *string `locationName:"defaultBranch" min:"1" type:"string"`
- // The date and time the repository was last modified, in timestamp format.
- LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp" timestampFormat:"unix"`
- // A comment or description about the repository.
- RepositoryDescription *string `locationName:"repositoryDescription" type:"string"`
- // The ID of the repository.
- RepositoryId *string `locationName:"repositoryId" type:"string"`
- // The repository's name.
- RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"`
- }
- // String returns the string representation
- func (s RepositoryMetadata) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s RepositoryMetadata) GoString() string {
- return s.String()
- }
- // Information about a repository name and ID.
- type RepositoryNameIdPair struct {
- _ struct{} `type:"structure"`
- // The ID associated with the repository.
- RepositoryId *string `locationName:"repositoryId" type:"string"`
- // The name associated with the repository.
- RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"`
- }
- // String returns the string representation
- func (s RepositoryNameIdPair) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s RepositoryNameIdPair) GoString() string {
- return s.String()
- }
- // Information about a trigger for a repository.
- type RepositoryTrigger struct {
- _ struct{} `type:"structure"`
- // The branches that will be included in the trigger configuration. If no branches
- // are specified, the trigger will apply to all branches.
- Branches []*string `locationName:"branches" type:"list"`
- // Any custom data associated with the trigger that will be included in the
- // information sent to the target of the trigger.
- CustomData *string `locationName:"customData" type:"string"`
- // The ARN of the resource that is the target for a trigger. For example, the
- // ARN of a topic in Amazon Simple Notification Service (SNS).
- DestinationArn *string `locationName:"destinationArn" type:"string"`
- // The repository events that will cause the trigger to run actions in another
- // service, such as sending a notification through Amazon Simple Notification
- // Service (SNS). If no events are specified, the trigger will run for all repository
- // events.
- Events []*string `locationName:"events" type:"list"`
- // The name of the trigger.
- Name *string `locationName:"name" type:"string"`
- }
- // String returns the string representation
- func (s RepositoryTrigger) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s RepositoryTrigger) GoString() string {
- return s.String()
- }
- // A trigger failed to run.
- type RepositoryTriggerExecutionFailure struct {
- _ struct{} `type:"structure"`
- // Additional message information about the trigger that did not run.
- FailureMessage *string `locationName:"failureMessage" type:"string"`
- // The name of the trigger that did not run.
- Trigger *string `locationName:"trigger" type:"string"`
- }
- // String returns the string representation
- func (s RepositoryTriggerExecutionFailure) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s RepositoryTriggerExecutionFailure) GoString() string {
- return s.String()
- }
- // Represents the input of a test repository triggers operation.
- type TestRepositoryTriggersInput struct {
- _ struct{} `type:"structure"`
- // The name of the repository in which to test the triggers.
- RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"`
- // The list of triggers to test.
- Triggers []*RepositoryTrigger `locationName:"triggers" type:"list"`
- }
- // String returns the string representation
- func (s TestRepositoryTriggersInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s TestRepositoryTriggersInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *TestRepositoryTriggersInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "TestRepositoryTriggersInput"}
- if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // Represents the output of a test repository triggers operation.
- type TestRepositoryTriggersOutput struct {
- _ struct{} `type:"structure"`
- // The list of triggers that were not able to be tested. This list provides
- // the names of the triggers that could not be tested, separated by commas.
- FailedExecutions []*RepositoryTriggerExecutionFailure `locationName:"failedExecutions" type:"list"`
- // The list of triggers that were successfully tested. This list provides the
- // names of the triggers that were successfully tested, separated by commas.
- SuccessfulExecutions []*string `locationName:"successfulExecutions" type:"list"`
- }
- // String returns the string representation
- func (s TestRepositoryTriggersOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s TestRepositoryTriggersOutput) GoString() string {
- return s.String()
- }
- // Represents the input of an update default branch operation.
- type UpdateDefaultBranchInput struct {
- _ struct{} `type:"structure"`
- // The name of the branch to set as the default.
- DefaultBranchName *string `locationName:"defaultBranchName" min:"1" type:"string" required:"true"`
- // The name of the repository to set or change the default branch for.
- RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s UpdateDefaultBranchInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UpdateDefaultBranchInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *UpdateDefaultBranchInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "UpdateDefaultBranchInput"}
- if s.DefaultBranchName == nil {
- invalidParams.Add(request.NewErrParamRequired("DefaultBranchName"))
- }
- if s.DefaultBranchName != nil && len(*s.DefaultBranchName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("DefaultBranchName", 1))
- }
- if s.RepositoryName == nil {
- invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
- }
- if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type UpdateDefaultBranchOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s UpdateDefaultBranchOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UpdateDefaultBranchOutput) GoString() string {
- return s.String()
- }
- // Represents the input of an update repository description operation.
- type UpdateRepositoryDescriptionInput struct {
- _ struct{} `type:"structure"`
- // The new comment or description for the specified repository. Repository descriptions
- // are limited to 1,000 characters.
- RepositoryDescription *string `locationName:"repositoryDescription" type:"string"`
- // The name of the repository to set or change the comment or description for.
- RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s UpdateRepositoryDescriptionInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UpdateRepositoryDescriptionInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *UpdateRepositoryDescriptionInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "UpdateRepositoryDescriptionInput"}
- if s.RepositoryName == nil {
- invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
- }
- if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type UpdateRepositoryDescriptionOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s UpdateRepositoryDescriptionOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UpdateRepositoryDescriptionOutput) GoString() string {
- return s.String()
- }
- // Represents the input of an update repository description operation.
- type UpdateRepositoryNameInput struct {
- _ struct{} `type:"structure"`
- // The new name for the repository.
- NewName *string `locationName:"newName" min:"1" type:"string" required:"true"`
- // The existing name of the repository.
- OldName *string `locationName:"oldName" min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s UpdateRepositoryNameInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UpdateRepositoryNameInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *UpdateRepositoryNameInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "UpdateRepositoryNameInput"}
- if s.NewName == nil {
- invalidParams.Add(request.NewErrParamRequired("NewName"))
- }
- if s.NewName != nil && len(*s.NewName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("NewName", 1))
- }
- if s.OldName == nil {
- invalidParams.Add(request.NewErrParamRequired("OldName"))
- }
- if s.OldName != nil && len(*s.OldName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("OldName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type UpdateRepositoryNameOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s UpdateRepositoryNameOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UpdateRepositoryNameOutput) GoString() string {
- return s.String()
- }
- // Information about the user who made a specified commit.
- type UserInfo struct {
- _ struct{} `type:"structure"`
- // The date when the specified commit was pushed to the repository.
- Date *string `locationName:"date" type:"string"`
- // The email address associated with the user who made the commit, if any.
- Email *string `locationName:"email" type:"string"`
- // The name of the user who made the specified commit.
- Name *string `locationName:"name" type:"string"`
- }
- // String returns the string representation
- func (s UserInfo) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UserInfo) GoString() string {
- return s.String()
- }
- const (
- // @enum OrderEnum
- OrderEnumAscending = "ascending"
- // @enum OrderEnum
- OrderEnumDescending = "descending"
- )
- const (
- // @enum RepositoryTriggerEventEnum
- RepositoryTriggerEventEnumAll = "all"
- // @enum RepositoryTriggerEventEnum
- RepositoryTriggerEventEnumUpdateReference = "updateReference"
- // @enum RepositoryTriggerEventEnum
- RepositoryTriggerEventEnumCreateReference = "createReference"
- // @enum RepositoryTriggerEventEnum
- RepositoryTriggerEventEnumDeleteReference = "deleteReference"
- )
- const (
- // @enum SortByEnum
- SortByEnumRepositoryName = "repositoryName"
- // @enum SortByEnum
- SortByEnumLastModifiedDate = "lastModifiedDate"
- )
|