config

package
v0.0.0-...-20be885 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

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

func NewRepository

func NewRepository() Repository

type RepositoryImpl

type RepositoryImpl struct {
	Profile  string
	ReadDsn  string
	WriteDsn string
	Port     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
}

func NewService

func NewService(
	cr Repository,
) *Service

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