github

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2023 License: Apache-2.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_github_proto protoreflect.FileDescriptor

Functions

func NewGithubEndpoints

func NewGithubEndpoints() []*api.Endpoint

func RegisterGithubHandler

func RegisterGithubHandler(s server.Server, hdlr GithubHandler, opts ...server.HandlerOption) error

Types

type AuthorizeRequest

type AuthorizeRequest struct {
	InstallationId string `protobuf:"bytes,1,opt,name=installation_id,json=installationId,proto3" json:"installation_id,omitempty"`
	Code           string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthorizeRequest) Descriptor deprecated

func (*AuthorizeRequest) Descriptor() ([]byte, []int)

Deprecated: Use AuthorizeRequest.ProtoReflect.Descriptor instead.

func (*AuthorizeRequest) GetCode

func (x *AuthorizeRequest) GetCode() string

func (*AuthorizeRequest) GetInstallationId

func (x *AuthorizeRequest) GetInstallationId() string

func (*AuthorizeRequest) ProtoMessage

func (*AuthorizeRequest) ProtoMessage()

func (*AuthorizeRequest) ProtoReflect

func (x *AuthorizeRequest) ProtoReflect() protoreflect.Message

func (*AuthorizeRequest) Reset

func (x *AuthorizeRequest) Reset()

func (*AuthorizeRequest) String

func (x *AuthorizeRequest) String() string

type AuthorizeResponse

type AuthorizeResponse struct {
	// contains filtered or unexported fields
}

func (*AuthorizeResponse) Descriptor deprecated

func (*AuthorizeResponse) Descriptor() ([]byte, []int)

Deprecated: Use AuthorizeResponse.ProtoReflect.Descriptor instead.

func (*AuthorizeResponse) ProtoMessage

func (*AuthorizeResponse) ProtoMessage()

func (*AuthorizeResponse) ProtoReflect

func (x *AuthorizeResponse) ProtoReflect() protoreflect.Message

func (*AuthorizeResponse) Reset

func (x *AuthorizeResponse) Reset()

func (*AuthorizeResponse) String

func (x *AuthorizeResponse) String() string

type GithubHandler

type GithubHandler interface {
	// Authorize the M3O Github app - completes the installation
	Authorize(context.Context, *AuthorizeRequest, *AuthorizeResponse) error
	// Get list of all the repos accessible from this installation
	ListRepos(context.Context, *ListReposRequest, *ListReposResponse) error
	// Get branches for a repo
	ListBranches(context.Context, *ListBranchesRequest, *ListBranchesResponse) error
	// Get a token that can be used with this user's repo
	Token(context.Context, *TokenRequest, *TokenResponse) error
}

type GithubService

type GithubService interface {
	// Authorize the M3O Github app - completes the installation
	Authorize(ctx context.Context, in *AuthorizeRequest, opts ...client.CallOption) (*AuthorizeResponse, error)
	// Get list of all the repos accessible from this installation
	ListRepos(ctx context.Context, in *ListReposRequest, opts ...client.CallOption) (*ListReposResponse, error)
	// Get branches for a repo
	ListBranches(ctx context.Context, in *ListBranchesRequest, opts ...client.CallOption) (*ListBranchesResponse, error)
	// Get a token that can be used with this user's repo
	Token(ctx context.Context, in *TokenRequest, opts ...client.CallOption) (*TokenResponse, error)
}

func NewGithubService

func NewGithubService(name string, c client.Client) GithubService

type ListBranchesRequest

type ListBranchesRequest struct {

	// full name <owner>/<repo> e.g. micro/services
	Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"`
	// contains filtered or unexported fields
}

func (*ListBranchesRequest) Descriptor deprecated

func (*ListBranchesRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListBranchesRequest.ProtoReflect.Descriptor instead.

func (*ListBranchesRequest) GetRepo

func (x *ListBranchesRequest) GetRepo() string

func (*ListBranchesRequest) ProtoMessage

func (*ListBranchesRequest) ProtoMessage()

func (*ListBranchesRequest) ProtoReflect

func (x *ListBranchesRequest) ProtoReflect() protoreflect.Message

func (*ListBranchesRequest) Reset

func (x *ListBranchesRequest) Reset()

func (*ListBranchesRequest) String

func (x *ListBranchesRequest) String() string

type ListBranchesResponse

type ListBranchesResponse struct {
	Branches []string `protobuf:"bytes,1,rep,name=branches,proto3" json:"branches,omitempty"`
	// contains filtered or unexported fields
}

func (*ListBranchesResponse) Descriptor deprecated

func (*ListBranchesResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListBranchesResponse.ProtoReflect.Descriptor instead.

func (*ListBranchesResponse) GetBranches

func (x *ListBranchesResponse) GetBranches() []string

func (*ListBranchesResponse) ProtoMessage

func (*ListBranchesResponse) ProtoMessage()

func (*ListBranchesResponse) ProtoReflect

func (x *ListBranchesResponse) ProtoReflect() protoreflect.Message

func (*ListBranchesResponse) Reset

func (x *ListBranchesResponse) Reset()

func (*ListBranchesResponse) String

func (x *ListBranchesResponse) String() string

type ListReposRequest

type ListReposRequest struct {
	// contains filtered or unexported fields
}

func (*ListReposRequest) Descriptor deprecated

func (*ListReposRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListReposRequest.ProtoReflect.Descriptor instead.

func (*ListReposRequest) ProtoMessage

func (*ListReposRequest) ProtoMessage()

func (*ListReposRequest) ProtoReflect

func (x *ListReposRequest) ProtoReflect() protoreflect.Message

func (*ListReposRequest) Reset

func (x *ListReposRequest) Reset()

func (*ListReposRequest) String

func (x *ListReposRequest) String() string

type ListReposResponse

type ListReposResponse struct {
	Repos []string `protobuf:"bytes,1,rep,name=repos,proto3" json:"repos,omitempty"`
	// contains filtered or unexported fields
}

func (*ListReposResponse) Descriptor deprecated

func (*ListReposResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListReposResponse.ProtoReflect.Descriptor instead.

func (*ListReposResponse) GetRepos

func (x *ListReposResponse) GetRepos() []string

func (*ListReposResponse) ProtoMessage

func (*ListReposResponse) ProtoMessage()

func (*ListReposResponse) ProtoReflect

func (x *ListReposResponse) ProtoReflect() protoreflect.Message

func (*ListReposResponse) Reset

func (x *ListReposResponse) Reset()

func (*ListReposResponse) String

func (x *ListReposResponse) String() string

type TokenRequest

type TokenRequest struct {
	TenantId string `protobuf:"bytes,1,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
	// contains filtered or unexported fields
}

func (*TokenRequest) Descriptor deprecated

func (*TokenRequest) Descriptor() ([]byte, []int)

Deprecated: Use TokenRequest.ProtoReflect.Descriptor instead.

func (*TokenRequest) GetTenantId

func (x *TokenRequest) GetTenantId() string

func (*TokenRequest) ProtoMessage

func (*TokenRequest) ProtoMessage()

func (*TokenRequest) ProtoReflect

func (x *TokenRequest) ProtoReflect() protoreflect.Message

func (*TokenRequest) Reset

func (x *TokenRequest) Reset()

func (*TokenRequest) String

func (x *TokenRequest) String() string

type TokenResponse

type TokenResponse struct {
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

func (*TokenResponse) Descriptor deprecated

func (*TokenResponse) Descriptor() ([]byte, []int)

Deprecated: Use TokenResponse.ProtoReflect.Descriptor instead.

func (*TokenResponse) GetToken

func (x *TokenResponse) GetToken() string

func (*TokenResponse) ProtoMessage

func (*TokenResponse) ProtoMessage()

func (*TokenResponse) ProtoReflect

func (x *TokenResponse) ProtoReflect() protoreflect.Message

func (*TokenResponse) Reset

func (x *TokenResponse) Reset()

func (*TokenResponse) String

func (x *TokenResponse) String() string

Jump to

Keyboard shortcuts

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