sourcerepo

package
v0.0.0-...-2824937 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2020 License: MIT, Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package sourcerepo is a generated protocol buffer package.

It is generated from these files:

google/devtools/sourcerepo/v1/sourcerepo.proto

It has these top-level messages:

Repo
MirrorConfig
GetRepoRequest
ListReposRequest
ListReposResponse
CreateRepoRequest
DeleteRepoRequest

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterSourceRepoServer

func RegisterSourceRepoServer(s *grpc.Server, srv SourceRepoServer)

Types

type CreateRepoRequest

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"`
}

Request for CreateRepo

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

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"`
}

Request for DeleteRepo.

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

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"`
}

Request for GetRepo.

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

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"`
}

Request for ListRepos.

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

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"`
}

Response for ListRepos. The size is not set in the returned repositories.

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

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 webhook 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"`
}

Configuration to automatically mirror a repository from another hosting service, for example GitHub or BitBucket.

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

type Repo struct {
	// Resource name of the repository, of the form
	// `projects/<project>/repos/<repo>`.  The repo name may contain slashes.
	// eg, `projects/myproject/repos/name/with/slash`
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// The disk usage of the repo, in bytes. Read-only field. Size is 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.
	// Read-only field.
	Url string `protobuf:"bytes,3,opt,name=url" json:"url,omitempty"`
	// How this repository mirrors a repository managed by another service.
	// Read-only field.
	MirrorConfig *MirrorConfig `protobuf:"bytes,4,opt,name=mirror_config,json=mirrorConfig" json:"mirror_config,omitempty"`
}

A repository (or repo) is a Git repository storing versioned source content.

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)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL