Documentation

Index

Constants

View Source
const (
	AssetGroupModeSingle = "single"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterAssetGroupRepository

type ClusterAssetGroupRepository interface {
	Get(id string) (clusterassetgroup.Entry, apperrors.AppError)
	Create(assetGroup clusterassetgroup.Entry) apperrors.AppError
	Update(assetGroup clusterassetgroup.Entry) apperrors.AppError
	Delete(id string) apperrors.AppError
}

go:generate mockery --name=ClusterAssetGroupRepository

func NewAssetGroupRepository

func NewAssetGroupRepository(resourceInterface ResourceInterface) ClusterAssetGroupRepository

type ResourceInterface

type ResourceInterface interface {
	Get(ctx context.Context, name string, opts metav1.GetOptions, subresources ...string) (*unstructured.Unstructured, error)
	Delete(ctx context.Context, name string, opts metav1.DeleteOptions, subresources ...string) error
	Create(ctx context.Context, obj *unstructured.Unstructured, options metav1.CreateOptions, subresources ...string) (*unstructured.Unstructured, error)
	Update(ctx context.Context, obj *unstructured.Unstructured, options metav1.UpdateOptions, subresources ...string) (*unstructured.Unstructured, error)
}

go:generate mockery --name=ResourceInterface

type Service

type Service interface {
	Put(id string, assets []clusterassetgroup.Asset) apperrors.AppError
	Delete(id string) apperrors.AppError
}

go:generate mockery --name=Service

func NewService

func NewService(repository ClusterAssetGroupRepository, uploadClient upload.Client) Service

Directories

Path Synopsis
clusterassetgroup
mocks
upload
upload/mocks