bucketservice

package
v0.0.0-...-a9081ec Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package bucketservice holds the business logic and data structures associated with the bucket domain.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BucketRepository Repository
	Tracer           trace.Tracer
	Logger           *otelzap.Logger
}

Config will hold repository and used utils that will be injected into this Service layer on service initialization

type Interface

type Interface interface {
	UploadHealthCheckResult(ctx context.Context, bucketName, objName string, imageFileHeader *multipart.FileHeader) (string, error)
}

Interface specifies the business operations of the service.

func New

func New(c *Config) Interface

New configures and returns an Interface implementation.

type MockInterface

type MockInterface struct {
	mock.Mock
}

MockInterface is an autogenerated mock type for the Interface type

func NewMockInterface

func NewMockInterface(t mockConstructorTestingTNewMockInterface) *MockInterface

NewMockInterface creates a new instance of MockInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockInterface) UploadHealthCheckResult

func (_m *MockInterface) UploadHealthCheckResult(ctx context.Context, bucketName string, objName string, imageFileHeader *multipart.FileHeader) (string, error)

UploadHealthCheckResult provides a mock function with given fields: ctx, bucketName, objName, imageFileHeader

type MockRepository

type MockRepository struct {
	mock.Mock
}

MockRepository is an autogenerated mock type for the Repository type

func NewMockRepository

func NewMockRepository(t mockConstructorTestingTNewMockRepository) *MockRepository

NewMockRepository creates a new instance of MockRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockRepository) UploadFile

func (_m *MockRepository) UploadFile(ctx context.Context, bucketName string, objName string, imageFile multipart.File) (string, error)

UploadFile provides a mock function with given fields: ctx, bucketName, objName, imageFile

type Repository

type Repository interface {
	UploadFile(ctx context.Context, bucketName, objName string, imageFile multipart.File) (string, error)
}

Repository contain all the function available in the defined domain

Jump to

Keyboard shortcuts

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