Documentation ¶
Overview ¶
Package testproviders provides test implementations of the provider interfaces.
Index ¶
- type GitProvider
- type RESTProvider
- func (_ *RESTProvider) CanImplement(trait minderv1.ProviderType) bool
- func (_ *RESTProvider) DeregisterEntity(_ context.Context, _ minderv1.Entity, _ *properties.Properties) error
- func (_ *RESTProvider) FetchAllProperties(_ context.Context, _ *properties.Properties, _ minderv1.Entity, ...) (*properties.Properties, error)
- func (_ *RESTProvider) FetchProperty(_ context.Context, _ *properties.Properties, _ minderv1.Entity, _ string) (*properties.Property, error)
- func (_ *RESTProvider) GetEntityName(_ minderv1.Entity, _ *properties.Properties) (string, error)
- func (_ *RESTProvider) RegisterEntity(_ context.Context, _ minderv1.Entity, _ *properties.Properties) (*properties.Properties, error)
- func (_ *RESTProvider) ReregisterEntity(_ context.Context, _ minderv1.Entity, _ *properties.Properties) error
- func (_ *RESTProvider) SupportsEntity(_ minderv1.Entity) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitProvider ¶
GitProvider is a test implementation of the Git provider interface
func NewGitProvider ¶
func NewGitProvider(credential provifv1.GitCredential, opts ...git.Options) *GitProvider
NewGitProvider creates a new Git provider with credentials and options
func (*GitProvider) CanImplement ¶
func (_ *GitProvider) CanImplement(trait minderv1.ProviderType) bool
CanImplement implements the Provider interface
type RESTProvider ¶
RESTProvider is a test implementation of the REST provider interface
func NewRESTProvider ¶
func NewRESTProvider( config *minderv1.RESTProviderConfig, metrics telemetry.HttpClientMetrics, credential provifv1.RestCredential, ) (*RESTProvider, error)
NewRESTProvider creates a new REST provider
func (*RESTProvider) CanImplement ¶
func (_ *RESTProvider) CanImplement(trait minderv1.ProviderType) bool
CanImplement implements the Provider interface
func (*RESTProvider) DeregisterEntity ¶
func (_ *RESTProvider) DeregisterEntity(_ context.Context, _ minderv1.Entity, _ *properties.Properties) error
DeregisterEntity implements the Provider interface
func (*RESTProvider) FetchAllProperties ¶
func (_ *RESTProvider) FetchAllProperties( _ context.Context, _ *properties.Properties, _ minderv1.Entity, _ *properties.Properties, ) (*properties.Properties, error)
FetchAllProperties implements the Provider interface
func (*RESTProvider) FetchProperty ¶
func (_ *RESTProvider) FetchProperty( _ context.Context, _ *properties.Properties, _ minderv1.Entity, _ string) (*properties.Property, error)
FetchProperty implements the Provider interface
func (*RESTProvider) GetEntityName ¶
func (_ *RESTProvider) GetEntityName(_ minderv1.Entity, _ *properties.Properties) (string, error)
GetEntityName implements the Provider interface
func (*RESTProvider) RegisterEntity ¶
func (_ *RESTProvider) RegisterEntity( _ context.Context, _ minderv1.Entity, _ *properties.Properties, ) (*properties.Properties, error)
RegisterEntity implements the Provider interface
func (*RESTProvider) ReregisterEntity ¶
func (_ *RESTProvider) ReregisterEntity( _ context.Context, _ minderv1.Entity, _ *properties.Properties, ) error
ReregisterEntity implements the Provider interface
func (*RESTProvider) SupportsEntity ¶
func (_ *RESTProvider) SupportsEntity(_ minderv1.Entity) bool
SupportsEntity implements the Provider interface