fabric

package
v0.0.0-...-9666bc6 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package fabric is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotFound is returned when a fabric was not found.
	ErrNotFound = errors.New("fabric not found")

	// ErrSyncUnavailable defines the error of the versions definition is unavailable.
	ErrSyncUnavailable = errors.New("fabric version service is unavailable")

	// ErrAlreadyAssigned defines the error if a build is already assigned.
	ErrAlreadyAssigned = errors.New("is already attached")

	// ErrNotAssigned defines the error if a build is not assigned.
	ErrNotAssigned = errors.New("is not attached")
)

Functions

func FetchRemote

func FetchRemote() (fabricClient.Versions, error)

FetchRemote is just a wrapper to get a syncable list of versions.

Types

type GormService

type GormService struct {
	// contains filtered or unexported fields
}

GormService defines the service to store content within a database based on Gorm.

func NewGormService

func NewGormService(
	handle *gorm.DB,
	cfg *config.Config,
) *GormService

NewGormService initializes the service to store content within a database based on Gorm.

func (*GormService) AttachBuild

func (s *GormService) AttachBuild(ctx context.Context, params model.FabricBuildParams) error

AttachBuild implements the Service interface for database persistence.

func (*GormService) DropBuild

func (s *GormService) DropBuild(ctx context.Context, params model.FabricBuildParams) error

DropBuild implements the Service interface for database persistence.

func (*GormService) List

func (s *GormService) List(ctx context.Context, params model.ListParams) ([]*model.Fabric, int64, error)

List implements the Service interface for database persistence.

func (*GormService) ListBuilds

func (s *GormService) ListBuilds(ctx context.Context, params model.FabricBuildParams) ([]*model.Build, int64, error)

ListBuilds implements the Service interface for database persistence.

func (*GormService) Show

func (s *GormService) Show(ctx context.Context, name string) (*model.Fabric, error)

Show implements the Service interface for database persistence.

func (*GormService) Sync

func (s *GormService) Sync(ctx context.Context, versions fabricClient.Versions) error

Sync implements the Store interface for database persistence.

func (*GormService) WithPrincipal

func (s *GormService) WithPrincipal(principal *model.User) Service

WithPrincipal implements the Service interface for database persistence.

type MockService

type MockService struct {
	// contains filtered or unexported fields
}

MockService is a mock of Service interface.

func NewMockService

func NewMockService(ctrl *gomock.Controller) *MockService

NewMockService creates a new mock instance.

func (*MockService) AttachBuild

func (m *MockService) AttachBuild(arg0 context.Context, arg1 model.FabricBuildParams) error

AttachBuild mocks base method.

func (*MockService) DropBuild

func (m *MockService) DropBuild(arg0 context.Context, arg1 model.FabricBuildParams) error

DropBuild mocks base method.

func (*MockService) EXPECT

func (m *MockService) EXPECT() *MockServiceMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockService) List

func (m *MockService) List(arg0 context.Context, arg1 model.ListParams) ([]*model.Fabric, int64, error)

List mocks base method.

func (*MockService) ListBuilds

func (m *MockService) ListBuilds(arg0 context.Context, arg1 model.FabricBuildParams) ([]*model.Build, int64, error)

ListBuilds mocks base method.

func (*MockService) Show

func (m *MockService) Show(arg0 context.Context, arg1 string) (*model.Fabric, error)

Show mocks base method.

func (*MockService) Sync

func (m *MockService) Sync(arg0 context.Context, arg1 fabric.Versions) error

Sync mocks base method.

func (*MockService) WithPrincipal

func (m *MockService) WithPrincipal(arg0 *model.User) Service

WithPrincipal mocks base method.

type MockServiceMockRecorder

type MockServiceMockRecorder struct {
	// contains filtered or unexported fields
}

MockServiceMockRecorder is the mock recorder for MockService.

func (*MockServiceMockRecorder) AttachBuild

func (mr *MockServiceMockRecorder) AttachBuild(arg0, arg1 interface{}) *gomock.Call

AttachBuild indicates an expected call of AttachBuild.

func (*MockServiceMockRecorder) DropBuild

func (mr *MockServiceMockRecorder) DropBuild(arg0, arg1 interface{}) *gomock.Call

DropBuild indicates an expected call of DropBuild.

func (*MockServiceMockRecorder) List

func (mr *MockServiceMockRecorder) List(arg0, arg1 interface{}) *gomock.Call

List indicates an expected call of List.

func (*MockServiceMockRecorder) ListBuilds

func (mr *MockServiceMockRecorder) ListBuilds(arg0, arg1 interface{}) *gomock.Call

ListBuilds indicates an expected call of ListBuilds.

func (*MockServiceMockRecorder) Show

func (mr *MockServiceMockRecorder) Show(arg0, arg1 interface{}) *gomock.Call

Show indicates an expected call of Show.

func (*MockServiceMockRecorder) Sync

func (mr *MockServiceMockRecorder) Sync(arg0, arg1 interface{}) *gomock.Call

Sync indicates an expected call of Sync.

func (*MockServiceMockRecorder) WithPrincipal

func (mr *MockServiceMockRecorder) WithPrincipal(arg0 interface{}) *gomock.Call

WithPrincipal indicates an expected call of WithPrincipal.

type Service

Service handles all interactions with fabric.

func NewLoggingService

func NewLoggingService(s Service) Service

NewLoggingService wraps the Service and provides logging for its methods.

func NewMetricsService

func NewMetricsService(s Service, m *metrics.Metrics) Service

NewMetricsService wraps the Service and provides metrics for its methods.

func NewService

func NewService(fabric Service) Service

NewService returns a Service that handles all interactions with fabric.

Jump to

Keyboard shortcuts

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