config

package
v0.0.0-...-5bec41d Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Code generated by MockGen. DO NOT EDIT. Source: internal/config/repository.go

Generated by this command:

mockgen -source=internal/config/repository.go -package=config

Package config is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockRepository

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

MockRepository is a mock of Repository interface.

func NewMockRepository

func NewMockRepository(ctrl *gomock.Controller) *MockRepository

NewMockRepository creates a new mock instance.

func (*MockRepository) EXPECT

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

func (*MockRepository) GetDefaultUserPassword

func (m *MockRepository) GetDefaultUserPassword() string

GetDefaultUserPassword mocks base method.

func (*MockRepository) GetDsn

func (m *MockRepository) GetDsn() string

GetDsn mocks base method.

func (*MockRepository) GetJwtSecret

func (m *MockRepository) GetJwtSecret() string

GetJwtSecret mocks base method.

func (*MockRepository) GetJwtValidMinute

func (m *MockRepository) GetJwtValidMinute() int

GetJwtValidMinute mocks base method.

func (*MockRepository) GetPort

func (m *MockRepository) GetPort() int

GetPort mocks base method.

func (*MockRepository) GetProfile

func (m *MockRepository) GetProfile() string

GetProfile mocks base method.

type MockRepositoryMockRecorder

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

MockRepositoryMockRecorder is the mock recorder for MockRepository.

func (*MockRepositoryMockRecorder) GetDefaultUserPassword

func (mr *MockRepositoryMockRecorder) GetDefaultUserPassword() *gomock.Call

GetDefaultUserPassword indicates an expected call of GetDefaultUserPassword.

func (*MockRepositoryMockRecorder) GetDsn

func (mr *MockRepositoryMockRecorder) GetDsn() *gomock.Call

GetDsn indicates an expected call of GetDsn.

func (*MockRepositoryMockRecorder) GetJwtSecret

func (mr *MockRepositoryMockRecorder) GetJwtSecret() *gomock.Call

GetJwtSecret indicates an expected call of GetJwtSecret.

func (*MockRepositoryMockRecorder) GetJwtValidMinute

func (mr *MockRepositoryMockRecorder) GetJwtValidMinute() *gomock.Call

GetJwtValidMinute indicates an expected call of GetJwtValidMinute.

func (*MockRepositoryMockRecorder) GetPort

func (mr *MockRepositoryMockRecorder) GetPort() *gomock.Call

GetPort indicates an expected call of GetPort.

func (*MockRepositoryMockRecorder) GetProfile

func (mr *MockRepositoryMockRecorder) GetProfile() *gomock.Call

GetProfile indicates an expected call of GetProfile.

type Repository

type Repository interface {
	GetProfile() string
	GetReadDsn() string
	GetWriteDsn() string
	GetJwtSecret() string
	GetJwtValidMinute() int
	GetPort() int
	GetDefaultUserPassword() string
}

func NewRepository

func NewRepository() Repository

type RepositoryImpl

type RepositoryImpl struct {
	Profile             string
	ReadDsn             string
	WriteDsn            string
	JwtSecret           string
	JwtValidMinute      int
	Port                int
	DefaultUserPassword string
}

func (*RepositoryImpl) GetDefaultUserPassword

func (r *RepositoryImpl) GetDefaultUserPassword() string

func (*RepositoryImpl) GetJwtSecret

func (r *RepositoryImpl) GetJwtSecret() string

func (*RepositoryImpl) GetJwtValidMinute

func (r *RepositoryImpl) GetJwtValidMinute() int

func (*RepositoryImpl) GetPort

func (r *RepositoryImpl) GetPort() int

func (*RepositoryImpl) GetProfile

func (r *RepositoryImpl) GetProfile() string

func (*RepositoryImpl) GetReadDsn

func (r *RepositoryImpl) GetReadDsn() string

func (*RepositoryImpl) GetWriteDsn

func (r *RepositoryImpl) GetWriteDsn() string

type Service

type Service struct {
	ConfigRepository Repository
	ReadDb           *gorm.DB
	WriteDb          *gorm.DB
	TokenAuth        *jwtauth.JWTAuth
}

func NewService

func NewService(
	cr Repository,
) *Service

func (*Service) GetDefaultUserPassword

func (s *Service) GetDefaultUserPassword() string

func (*Service) GetJwtValidMinute

func (s *Service) GetJwtValidMinute() int

func (*Service) GetPort

func (s *Service) GetPort() int

func (*Service) GetProfile

func (s *Service) GetProfile() string

Jump to

Keyboard shortcuts

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