...
Package sourcerepo
Overview ▹
Index ▹
func RegisterSourceRepoServer ¶
func RegisterSourceRepoServer(s *grpc.Server, srv SourceRepoServer)
type CreateRepoRequest ¶
Request for CreateRepo
type CreateRepoRequest struct {
// The project in which to create the repo. Values are of the form
// `projects/<project>`.
Parent string `protobuf:"bytes,1,opt,name=parent" json:"parent,omitempty"`
// The repo to create. Only name should be set; setting other fields
// is an error. The project in the name should match the parent field.
Repo *Repo `protobuf:"bytes,2,opt,name=repo" json:"repo,omitempty"`
}
func (*CreateRepoRequest) Descriptor ¶
func (*CreateRepoRequest) Descriptor() ([]byte, []int)
func (*CreateRepoRequest) GetParent ¶
func (m *CreateRepoRequest) GetParent() string
func (*CreateRepoRequest) GetRepo ¶
func (m *CreateRepoRequest) GetRepo() *Repo
func (*CreateRepoRequest) ProtoMessage ¶
func (*CreateRepoRequest) ProtoMessage()
func (*CreateRepoRequest) Reset ¶
func (m *CreateRepoRequest) Reset()
func (*CreateRepoRequest) String ¶
func (m *CreateRepoRequest) String() string
type DeleteRepoRequest ¶
Request for DeleteRepo.
type DeleteRepoRequest struct {
// The name of the repo to delete. Values are of the form
// `projects/<project>/repos/<repo>`.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
}
func (*DeleteRepoRequest) Descriptor ¶
func (*DeleteRepoRequest) Descriptor() ([]byte, []int)
func (*DeleteRepoRequest) GetName ¶
func (m *DeleteRepoRequest) GetName() string
func (*DeleteRepoRequest) ProtoMessage ¶
func (*DeleteRepoRequest) ProtoMessage()
func (*DeleteRepoRequest) Reset ¶
func (m *DeleteRepoRequest) Reset()
func (*DeleteRepoRequest) String ¶
func (m *DeleteRepoRequest) String() string
type GetRepoRequest ¶
Request for GetRepo.
type GetRepoRequest struct {
// The name of the requested repository. Values are of the form
// `projects/<project>/repos/<repo>`.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
}
func (*GetRepoRequest) Descriptor ¶
func (*GetRepoRequest) Descriptor() ([]byte, []int)
func (*GetRepoRequest) GetName ¶
func (m *GetRepoRequest) GetName() string
func (*GetRepoRequest) ProtoMessage ¶
func (*GetRepoRequest) ProtoMessage()
func (*GetRepoRequest) Reset ¶
func (m *GetRepoRequest) Reset()
func (*GetRepoRequest) String ¶
func (m *GetRepoRequest) String() string
type ListReposRequest ¶
Request for ListRepos.
type ListReposRequest struct {
// The project ID whose repos should be listed. Values are of the form
// `projects/<project>`.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
// Maximum number of repositories to return; between 1 and 500.
// If not set or zero, defaults to 100 at the server.
PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize" json:"page_size,omitempty"`
// Resume listing repositories where a prior ListReposResponse
// left off. This is an opaque token that must be obtained from
// a recent, prior ListReposResponse's next_page_token field.
PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken" json:"page_token,omitempty"`
}
func (*ListReposRequest) Descriptor ¶
func (*ListReposRequest) Descriptor() ([]byte, []int)
func (*ListReposRequest) GetName ¶
func (m *ListReposRequest) GetName() string
func (*ListReposRequest) GetPageSize ¶
func (m *ListReposRequest) GetPageSize() int32
func (*ListReposRequest) GetPageToken ¶
func (m *ListReposRequest) GetPageToken() string
func (*ListReposRequest) ProtoMessage ¶
func (*ListReposRequest) ProtoMessage()
func (*ListReposRequest) Reset ¶
func (m *ListReposRequest) Reset()
func (*ListReposRequest) String ¶
func (m *ListReposRequest) String() string
type ListReposResponse ¶
Response for ListRepos. The size is not set in the returned repositories.
type ListReposResponse struct {
// The listed repos.
Repos []*Repo `protobuf:"bytes,1,rep,name=repos" json:"repos,omitempty"`
// If non-empty, additional repositories exist within the project. These
// can be retrieved by including this value in the next ListReposRequest's
// page_token field.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken" json:"next_page_token,omitempty"`
}
func (*ListReposResponse) Descriptor ¶
func (*ListReposResponse) Descriptor() ([]byte, []int)
func (*ListReposResponse) GetNextPageToken ¶
func (m *ListReposResponse) GetNextPageToken() string
func (*ListReposResponse) GetRepos ¶
func (m *ListReposResponse) GetRepos() []*Repo
func (*ListReposResponse) ProtoMessage ¶
func (*ListReposResponse) ProtoMessage()
func (*ListReposResponse) Reset ¶
func (m *ListReposResponse) Reset()
func (*ListReposResponse) String ¶
func (m *ListReposResponse) String() string
type MirrorConfig ¶
Configuration to automatically mirror a repository from another hosting service, for example GitHub or BitBucket.
type MirrorConfig struct {
// URL of the main repository at the other hosting service.
Url string `protobuf:"bytes,1,opt,name=url" json:"url,omitempty"`
// ID of the webhook listening to updates to trigger mirroring.
// Removing this webook from the other hosting service will stop
// Google Cloud Source Repositories from receiving notifications,
// and thereby disabling mirroring.
WebhookId string `protobuf:"bytes,2,opt,name=webhook_id,json=webhookId" json:"webhook_id,omitempty"`
// ID of the SSH deploy key at the other hosting service.
// Removing this key from the other service would deauthorize
// Google Cloud Source Repositories from mirroring.
DeployKeyId string `protobuf:"bytes,3,opt,name=deploy_key_id,json=deployKeyId" json:"deploy_key_id,omitempty"`
}
func (*MirrorConfig) Descriptor ¶
func (*MirrorConfig) Descriptor() ([]byte, []int)
func (*MirrorConfig) GetDeployKeyId ¶
func (m *MirrorConfig) GetDeployKeyId() string
func (*MirrorConfig) GetUrl ¶
func (m *MirrorConfig) GetUrl() string
func (*MirrorConfig) GetWebhookId ¶
func (m *MirrorConfig) GetWebhookId() string
func (*MirrorConfig) ProtoMessage ¶
func (*MirrorConfig) ProtoMessage()
func (*MirrorConfig) Reset ¶
func (m *MirrorConfig) Reset()
func (*MirrorConfig) String ¶
func (m *MirrorConfig) String() string
type Repo ¶
A repository (or repo) is a Git repository storing versioned source content.
type Repo struct {
// Resource name of the repository, of the form
// `projects/<project>/repos/<repo>`.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
// The disk usage of the repo, in bytes.
// Only returned by GetRepo.
Size int64 `protobuf:"varint,2,opt,name=size" json:"size,omitempty"`
// URL to clone the repository from Google Cloud Source Repositories.
Url string `protobuf:"bytes,3,opt,name=url" json:"url,omitempty"`
// How this repository mirrors a repository managed by another service.
MirrorConfig *MirrorConfig `protobuf:"bytes,4,opt,name=mirror_config,json=mirrorConfig" json:"mirror_config,omitempty"`
}
func (*Repo) Descriptor ¶
func (*Repo) Descriptor() ([]byte, []int)
func (*Repo) GetMirrorConfig ¶
func (m *Repo) GetMirrorConfig() *MirrorConfig
func (*Repo) GetName ¶
func (m *Repo) GetName() string
func (*Repo) GetSize ¶
func (m *Repo) GetSize() int64
func (*Repo) GetUrl ¶
func (m *Repo) GetUrl() string
func (*Repo) ProtoMessage ¶
func (*Repo) ProtoMessage()
func (*Repo) Reset ¶
func (m *Repo) Reset()
func (*Repo) String ¶
func (m *Repo) String() string
type SourceRepoClient ¶
type SourceRepoClient interface {
// Returns all repos belonging to a project. The sizes of the repos are
// not set by ListRepos. To get the size of a repo, use GetRepo.
ListRepos(ctx context.Context, in *ListReposRequest, opts ...grpc.CallOption) (*ListReposResponse, error)
// Returns information about a repo.
GetRepo(ctx context.Context, in *GetRepoRequest, opts ...grpc.CallOption) (*Repo, error)
// Creates a repo in the given project with the given name.
//
// If the named repository already exists, `CreateRepo` returns
// `ALREADY_EXISTS`.
CreateRepo(ctx context.Context, in *CreateRepoRequest, opts ...grpc.CallOption) (*Repo, error)
// Deletes a repo.
DeleteRepo(ctx context.Context, in *DeleteRepoRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error)
// Sets the access control policy on the specified resource. Replaces any
// existing policy.
SetIamPolicy(ctx context.Context, in *google_iam_v11.SetIamPolicyRequest, opts ...grpc.CallOption) (*google_iam_v1.Policy, error)
// Gets the access control policy for a resource.
// Returns an empty policy if the resource exists and does not have a policy
// set.
GetIamPolicy(ctx context.Context, in *google_iam_v11.GetIamPolicyRequest, opts ...grpc.CallOption) (*google_iam_v1.Policy, error)
// Returns permissions that a caller has on the specified resource.
// If the resource does not exist, this will return an empty set of
// permissions, not a NOT_FOUND error.
TestIamPermissions(ctx context.Context, in *google_iam_v11.TestIamPermissionsRequest, opts ...grpc.CallOption) (*google_iam_v11.TestIamPermissionsResponse, error)
}
func NewSourceRepoClient ¶
func NewSourceRepoClient(cc *grpc.ClientConn) SourceRepoClient
type SourceRepoServer ¶
type SourceRepoServer interface {
// Returns all repos belonging to a project. The sizes of the repos are
// not set by ListRepos. To get the size of a repo, use GetRepo.
ListRepos(context.Context, *ListReposRequest) (*ListReposResponse, error)
// Returns information about a repo.
GetRepo(context.Context, *GetRepoRequest) (*Repo, error)
// Creates a repo in the given project with the given name.
//
// If the named repository already exists, `CreateRepo` returns
// `ALREADY_EXISTS`.
CreateRepo(context.Context, *CreateRepoRequest) (*Repo, error)
// Deletes a repo.
DeleteRepo(context.Context, *DeleteRepoRequest) (*google_protobuf1.Empty, error)
// Sets the access control policy on the specified resource. Replaces any
// existing policy.
SetIamPolicy(context.Context, *google_iam_v11.SetIamPolicyRequest) (*google_iam_v1.Policy, error)
// Gets the access control policy for a resource.
// Returns an empty policy if the resource exists and does not have a policy
// set.
GetIamPolicy(context.Context, *google_iam_v11.GetIamPolicyRequest) (*google_iam_v1.Policy, error)
// Returns permissions that a caller has on the specified resource.
// If the resource does not exist, this will return an empty set of
// permissions, not a NOT_FOUND error.
TestIamPermissions(context.Context, *google_iam_v11.TestIamPermissionsRequest) (*google_iam_v11.TestIamPermissionsResponse, error)
}
ActiveGo 1.8