testproviders

package
v0.0.79 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package testproviders provides test implementations of the provider interfaces.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitProvider

type GitProvider struct {
	noop.Provider
	*git.Git
}

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

type RESTProvider struct {
	noop.Provider
	*http.REST
}

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

FetchAllProperties implements the Provider interface

func (*RESTProvider) FetchProperty

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

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

Jump to

Keyboard shortcuts

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