base

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Paths

type Paths struct {
	HomeDir     string
	ConfDir     string
	DbDir       string
	LogDir      string
	TmpDir      string
	DownloadDir string
}

type Service

type Service struct {
	Paths       *Paths
	Log         *zap.SugaredLogger
	S3ClientMap map[string]*s3.Client
	DbClient    *sql.DB
	Ctx         context.Context
}

func (*Service) BuildFailed

func (*Service) BuildFailed(errCode, errMsg string) *models.BaseResponse

func (*Service) BuildSucess

func (*Service) BuildSucess(data interface{}) *models.BaseResponse

func (*Service) FixDatabaseLockd added in v1.3.0

func (s *Service) FixDatabaseLockd() error

func (*Service) GetCachedS3Client added in v1.3.0

func (s *Service) GetCachedS3Client(connectionId string) (*s3.Client, error)

func (*Service) GetTimeoutContext

func (s *Service) GetTimeoutContext() (context.Context, context.CancelFunc)

func (*Service) InitAndCacheS3Client

func (s *Service) InitAndCacheS3Client(connectionId string) (*s3.Client, error)

func (*Service) InitDbClient added in v1.3.0

func (s *Service) InitDbClient() error

func (*Service) QueryEncryptionKey

func (s *Service) QueryEncryptionKey() (string, error)

Jump to

Keyboard shortcuts

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