Documentation ¶
Index ¶
- func ParseAnnotations(message string) (res map[string]string)
- type Config
- type GitCredentialHelper
- type GithubRepoServer
- func (s *GithubRepoServer) ContentInitContainer(ctx context.Context, req *common.ContentInitContainerRequest) (*common.ContentInitContainerResponse, error)
- func (s *GithubRepoServer) Download(ctx context.Context, req *common.DownloadRequest) (*common.DownloadResponse, error)
- func (s *GithubRepoServer) GetRemoteAnnotations(ctx context.Context, req *common.GetRemoteAnnotationsRequest) (resp *common.GetRemoteAnnotationsResponse, err error)
- func (s *GithubRepoServer) ListFiles(ctx context.Context, req *common.ListFilesRequest) (*common.ListFilesReponse, error)
- func (s *GithubRepoServer) RepoHost(context.Context, *common.RepoHostRequest) (*common.RepoHostResponse, error)
- func (s *GithubRepoServer) Resolve(ctx context.Context, req *common.ResolveRequest) (*common.ResolveResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseAnnotations ¶
ParseAnnotations parses one annotation per line in the form of "/werft <key>(=<value>)?". Any line not matching this format is silently ignored.
Types ¶
type GitCredentialHelper ¶
GitCredentialHelper can authenticate provide authentication credentials for a repository
type GithubRepoServer ¶
type GithubRepoServer struct { Client *github.Client Auth GitCredentialHelper Config Config }
GithubRepoServer provides access to Github repos
func (*GithubRepoServer) ContentInitContainer ¶
func (s *GithubRepoServer) ContentInitContainer(ctx context.Context, req *common.ContentInitContainerRequest) (*common.ContentInitContainerResponse, error)
ContentInitContainer produces the init container YAML required to initialize the build context from this repository in /workspace.
func (*GithubRepoServer) Download ¶
func (s *GithubRepoServer) Download(ctx context.Context, req *common.DownloadRequest) (*common.DownloadResponse, error)
Download downloads a file from the repository.
func (*GithubRepoServer) GetRemoteAnnotations ¶
func (s *GithubRepoServer) GetRemoteAnnotations(ctx context.Context, req *common.GetRemoteAnnotationsRequest) (resp *common.GetRemoteAnnotationsResponse, err error)
GetRemoteAnnotations extracts werft annotations form information associated with a particular commit, e.g. the commit message, PRs or merge requests.
func (*GithubRepoServer) ListFiles ¶
func (s *GithubRepoServer) ListFiles(ctx context.Context, req *common.ListFilesRequest) (*common.ListFilesReponse, error)
ListFiles lists all files in a directory.
func (*GithubRepoServer) RepoHost ¶
func (s *GithubRepoServer) RepoHost(context.Context, *common.RepoHostRequest) (*common.RepoHostResponse, error)
RepoHost returns the host which this plugins integrates with
func (*GithubRepoServer) Resolve ¶
func (s *GithubRepoServer) Resolve(ctx context.Context, req *common.ResolveRequest) (*common.ResolveResponse, error)
Resolve resolves the repo's revision based on its ref(erence)