providers

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

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 ResolveProvider

func ResolveProvider(ctx context.Context, p *v1alpha1.Provider, k8s client.Client) (app Provider, err *ProviderError)

Types

type ErrorCode

type ErrorCode string

type GitHubApp

type GitHubApp struct {
	AppId      int64
	PrivateKey SecretBytes
	BaseURL    *string
}

func (*GitHubApp) Notify

type Provider

type Provider interface {
	Notify(ctx context.Context, pr *pipelinesv1beta1.PipelineRun) *ProviderError
}

type ProviderError

type ProviderError struct {
	Code    ErrorCode
	Message string
}

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

Jump to

Keyboard shortcuts

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