Documentation ¶
Index ¶
- Constants
- func NewGitHubApp(ctx context.Context, p *v1alpha1.Provider, k client.Client) (*GitHubApp, *ProviderError)
- func NewSlackApp(ctx context.Context, p *v1alpha1.Provider, k client.Client) (*SlackApp, *ProviderError)
- func ResolveProvider(ctx context.Context, p *v1alpha1.Provider, k8s client.Client) (app Provider, err *ProviderError)
- type ErrorCode
- type GitHubApp
- type Provider
- type ProviderError
- type SecretBytes
- type SecretString
- type SlackApp
Constants ¶
View Source
const ( ErrorCodeInvalidProviderSpec = ErrorCode("InvalidProviderSpec") ErrorCodeNotFoundPrivateKey = ErrorCode("NotFoundPrivateKey") ErrorCodeFailedValidation = ErrorCode("FailedValidation") ErrorCodeRuntimeError = ErrorCode("RuntimeError") )
View Source
const ( GitHubCommitStatusPending = "pending" GitHubCommitStatusSuccessful = "success" GitHubCommitStatusError = "error" GitHubCommitStatusFailure = "failure" )
Variables ¶
This section is empty.
Functions ¶
func NewGitHubApp ¶
func NewSlackApp ¶
func ResolveProvider ¶
Types ¶
type GitHubApp ¶
type GitHubApp struct { AppId int64 PrivateKey SecretBytes BaseURL *string }
func (*GitHubApp) Notify ¶
func (a *GitHubApp) Notify(ctx context.Context, pr *pipelinesv1beta1.PipelineRun) *ProviderError
type Provider ¶
type Provider interface {
Notify(ctx context.Context, pr *pipelinesv1beta1.PipelineRun) *ProviderError
}
type ProviderError ¶
func NewFailedValidationError ¶
func NewFailedValidationError(msg string) *ProviderError
func NewInvalidProviderSpecError ¶
func NewInvalidProviderSpecError(msg string) *ProviderError
func NewNotFoundPrivateKeyError ¶
func NewNotFoundPrivateKeyError(msg string) *ProviderError
func NewRuntimeError ¶
func NewRuntimeError(msg string) *ProviderError
func (*ProviderError) Error ¶
func (e *ProviderError) Error() string
type SecretBytes ¶
type SecretBytes struct {
// contains filtered or unexported fields
}
func NewSecretBytes ¶
func NewSecretBytes(data []byte) SecretBytes
func (*SecretBytes) GetNoRedacted ¶
func (s *SecretBytes) GetNoRedacted() []byte
func (*SecretBytes) GetNoRedactedString ¶
func (s *SecretBytes) GetNoRedactedString() string
func (*SecretBytes) GoString ¶
func (s *SecretBytes) GoString() string
func (*SecretBytes) MarshalJSON ¶
func (s *SecretBytes) MarshalJSON() ([]byte, error)
func (*SecretBytes) String ¶
func (s *SecretBytes) String() string
type SecretString ¶
type SecretString struct {
// contains filtered or unexported fields
}
func NewSecretString ¶
func NewSecretString(data string) SecretString
func (*SecretString) GetNoRedacted ¶
func (s *SecretString) GetNoRedacted() []byte
func (*SecretString) GetNoRedactedString ¶
func (s *SecretString) GetNoRedactedString() string
func (*SecretString) GoString ¶
func (s *SecretString) GoString() string
func (*SecretString) MarshalJSON ¶
func (s *SecretString) MarshalJSON() ([]byte, error)
func (*SecretString) String ¶
func (s *SecretString) String() string
type SlackApp ¶
type SlackApp struct { AccessToken SecretBytes Channels []v1alpha1.SlackChannel }
func (*SlackApp) Notify ¶
func (a *SlackApp) Notify(ctx context.Context, pr *pipelinesv1beta1.PipelineRun) *ProviderError
Click to show internal directories.
Click to hide internal directories.