Documentation
¶
Index ¶
- type AuthStrategy
- type BasicAuthStrategy
- type EventListener
- func (el *EventListener) GetEventName() string
- func (el *EventListener) GetEventSourceName() string
- func (el *EventListener) GetEventSourceType() v1alpha1.EventSourceType
- func (el *EventListener) StartListening(ctx context.Context, dispatch func([]byte, ...eventsourcecommon.Option) error) error
- func (el *EventListener) ValidateEventSource(ctx context.Context) error
- type OAuthTokenAuthStrategy
- type Router
- type WebhookSubscription
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthStrategy ¶
type AuthStrategy interface {
// BitbucketClient returns a bitbucket client initialized with the specific auth strategy
BitbucketClient() *bitbucketv2.Client
}
AuthStrategy is implemented by the different Bitbucket auth strategies that are supported
type BasicAuthStrategy ¶
type BasicAuthStrategy struct {
// contains filtered or unexported fields
}
func NewBasicAuthStrategy ¶
func NewBasicAuthStrategy(usernameSecret, passwordSecret *corev1.SecretKeySelector) (*BasicAuthStrategy, error)
func (*BasicAuthStrategy) BitbucketClient ¶
func (as *BasicAuthStrategy) BitbucketClient() *bitbucketv2.Client
BitbucketClient implements the AuthStrategy interface.
type EventListener ¶
type EventListener struct {
EventSourceName string
EventName string
BitbucketEventSource v1alpha1.BitbucketEventSource
Metrics *metrics.Metrics
}
EventListener implements ConfigExecutor
func (*EventListener) GetEventName ¶
func (el *EventListener) GetEventName() string
GetEventName returns name of event
func (*EventListener) GetEventSourceName ¶
func (el *EventListener) GetEventSourceName() string
GetEventSourceName returns name of event source
func (*EventListener) GetEventSourceType ¶
func (el *EventListener) GetEventSourceType() v1alpha1.EventSourceType
GetEventSourceType return type of event server
func (*EventListener) StartListening ¶
func (el *EventListener) StartListening(ctx context.Context, dispatch func([]byte, ...eventsourcecommon.Option) error) error
StartListening starts an event source
func (*EventListener) ValidateEventSource ¶
func (el *EventListener) ValidateEventSource(ctx context.Context) error
ValidateEventSource validates bitbucketserver event source
type OAuthTokenAuthStrategy ¶
type OAuthTokenAuthStrategy struct {
// contains filtered or unexported fields
}
func NewOAuthTokenAuthStrategy ¶
func NewOAuthTokenAuthStrategy(oauthTokenSecret *corev1.SecretKeySelector) (*OAuthTokenAuthStrategy, error)
func (*OAuthTokenAuthStrategy) BitbucketClient ¶
func (as *OAuthTokenAuthStrategy) BitbucketClient() *bitbucketv2.Client
BitbucketClient implements the AuthStrategy interface.
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
Router contains the configuration information for a route
func (*Router) HandleRoute ¶
func (router *Router) HandleRoute(writer http.ResponseWriter, request *http.Request)
HandleRoute handles incoming requests on the route
func (*Router) PostActivate ¶
PostActivate performs operations once the route is activated and ready to consume requests
func (*Router) PostInactivate ¶
PostInactivate performs operations after the route is inactivated
type WebhookSubscription ¶
type WebhookSubscription struct {
// Uuid holds the webhook's ID
Uuid string `json:"uuid"`
// The Url events get delivered to.
Url string `json:"url"`
// Description holds a user-defined description of the webhook.
Description string `json:"description,omitempty"`
// Subject holds metadata about the subject of the webhook (repository, etc.)
Subject map[string]interface{} `json:"subject,omitempty"`
// Active refers to status of the webhook for event deliveries.
Active bool `json:"active,omitempty"`
// The Events this webhook is subscribed to.
Events []string `json:"events"`
}