Documentation
¶
Index ¶
- func NewDefaultProvider() interface{}
- type AuthenticationProvider
- type AuthenticationProviderConfig
- type ErrorReportingProvider
- type GenericProvider
- type HttpContextProvider
- type HttpMethod
- type HttpTask
- type HttpTaskProvider
- type InstanceProviderFunc
- type LoggingProvider
- type MetricsProvider
- type ProviderConfig
- type ProviderType
- type Severity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDefaultProvider ¶
func NewDefaultProvider() interface{}
a NULL provider that does nothing but prevents NPEs in case someone forgets to actually initializa a 'real' platform provider
Types ¶
type AuthenticationProvider ¶
type AuthenticationProvider interface {
// Send an account challenge to confirm the account
AccountChallengeNotification(context.Context, string, string) error
// Send the new token
ProvideAuthorizationToken(context.Context, string, string, string) error
// Options returns the provider configuration
Options() *AuthenticationProviderConfig
}
type ErrorReportingProvider ¶
type ErrorReportingProvider interface {
ReportError(error)
}
type GenericProvider ¶
type GenericProvider interface {
Close() error
}
type HttpContextProvider ¶
type HttpMethod ¶
type HttpMethod int
const ( HttpMethodGet HttpMethod = iota HttpMethodPost HttpMethodPut HttpMethodDelete )
type HttpTask ¶
type HttpTask struct {
Method HttpMethod
Request string
Token string
Payload interface{}
}
type HttpTaskProvider ¶
type InstanceProviderFunc ¶
type InstanceProviderFunc func() interface{}
type LoggingProvider ¶
LoggingProvider defines a generic logging provider
type MetricsProvider ¶
type ProviderConfig ¶
type ProviderConfig struct {
ID string
Type ProviderType
Impl InstanceProviderFunc
}
func WithProvider ¶
func WithProvider(ID string, providerType ProviderType, impl InstanceProviderFunc) ProviderConfig
WithProvider returns a populated ProviderConfig struct.
type ProviderType ¶
type ProviderType int
const ( TypeLogger ProviderType = iota TypeErrorReporter TypeHttpContext TypeTask TypeMetrics TypeAuthentication )
func (ProviderType) String ¶
func (l ProviderType) String() string
Returns the name of a provider type
Click to show internal directories.
Click to hide internal directories.