buildversions

package
v0.0.0-...-a8d7ca2 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package buildversions is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidListParams defines the error if list receives invalid params.
	ErrInvalidListParams = errors.New("invalid parameters for list")

	// ErrNotFound defines the error if a member could not be found.
	ErrNotFound = errors.New("build or version not found")

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

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

Functions

This section is empty.

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,
	packs packsService.Service,
	builds buildsService.Service,
	mods modsService.Service,
	versions versionsService.Service,
) *GormService

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

func (*GormService) Attach

func (s *GormService) Attach(ctx context.Context, params model.BuildVersionParams) error

Attach implements the Service interface for database persistence.

func (*GormService) Drop

Drop implements the Service interface for database persistence.

func (*GormService) List

List implements the Service 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) Attach

func (m *MockService) Attach(arg0 context.Context, arg1 model.BuildVersionParams) error

Attach mocks base method.

func (*MockService) Drop

Drop 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

List 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) Attach

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

Attach indicates an expected call of Attach.

func (*MockServiceMockRecorder) Drop

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

Drop indicates an expected call of Drop.

func (*MockServiceMockRecorder) List

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

List indicates an expected call of List.

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 buildversions.

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(buildversions Service) Service

NewService returns a Service that handles all interactions with buildversions.

Jump to

Keyboard shortcuts

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