builds

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 builds is a generated GoMock package.

Index

Constants

This section is empty.

Variables

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

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,
	packsService packs.Service,
) *GormService

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

func (*GormService) Column

func (s *GormService) Column(ctx context.Context, params model.BuildParams, col string, val any) error

Column implements the Service interface for database persistence.

func (*GormService) Create

func (s *GormService) Create(ctx context.Context, params model.BuildParams, record *model.Build) error

Create implements the Service interface for database persistence.

func (*GormService) Delete

func (s *GormService) Delete(ctx context.Context, params model.BuildParams) error

Delete implements the Service interface for database persistence.

func (*GormService) Exists

func (s *GormService) Exists(ctx context.Context, params model.BuildParams) (bool, error)

Exists implements the Service interface for database persistence.

func (*GormService) List

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

List implements the Service interface for database persistence.

func (*GormService) Show

func (s *GormService) Show(ctx context.Context, params model.BuildParams) (*model.Build, error)

Show implements the Service interface for database persistence.

func (*GormService) Update

func (s *GormService) Update(ctx context.Context, params model.BuildParams, record *model.Build) error

Update 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) Column

func (m *MockService) Column(arg0 context.Context, arg1 model.BuildParams, arg2 string, arg3 any) error

Column mocks base method.

func (*MockService) Create

func (m *MockService) Create(arg0 context.Context, arg1 model.BuildParams, arg2 *model.Build) error

Create mocks base method.

func (*MockService) Delete

func (m *MockService) Delete(arg0 context.Context, arg1 model.BuildParams) error

Delete 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) Exists

func (m *MockService) Exists(arg0 context.Context, arg1 model.BuildParams) (bool, error)

Exists mocks base method.

func (*MockService) List

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

List mocks base method.

func (*MockService) Show

func (m *MockService) Show(arg0 context.Context, arg1 model.BuildParams) (*model.Build, error)

Show mocks base method.

func (*MockService) Update

func (m *MockService) Update(arg0 context.Context, arg1 model.BuildParams, arg2 *model.Build) error

Update 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) Column

func (mr *MockServiceMockRecorder) Column(arg0, arg1, arg2, arg3 interface{}) *gomock.Call

Column indicates an expected call of Column.

func (*MockServiceMockRecorder) Create

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

Create indicates an expected call of Create.

func (*MockServiceMockRecorder) Delete

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

Delete indicates an expected call of Delete.

func (*MockServiceMockRecorder) Exists

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

Exists indicates an expected call of Exists.

func (*MockServiceMockRecorder) List

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

List indicates an expected call of List.

func (*MockServiceMockRecorder) Show

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

Show indicates an expected call of Show.

func (*MockServiceMockRecorder) Update

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

Update indicates an expected call of Update.

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

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

NewService returns a Service that handles all interactions with builds.

Jump to

Keyboard shortcuts

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