configs

package
v0.0.0-...-974bc0d Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Migrate

func Migrate(db *gorm.DB) error

func NewDB

func NewDB(conf DBConfig) (*gorm.DB, error)

func NewGrpcUserService

func NewGrpcUserService(host string) (userpb.UserServiceClient, error)

func NewS3Client

func NewS3Client(url, region, accessKey, secretKey string) *s3.Client

Types

type DBConfig

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

func NewDBConfig

func NewDBConfig() DBConfig

func (DBConfig) WithHost

func (c DBConfig) WithHost(host string) DBConfig

func (DBConfig) WithName

func (c DBConfig) WithName(name string) DBConfig

func (DBConfig) WithPass

func (c DBConfig) WithPass(pass string) DBConfig

func (DBConfig) WithPort

func (c DBConfig) WithPort(port string) DBConfig

func (DBConfig) WithSecure

func (c DBConfig) WithSecure(ssl bool) DBConfig

func (DBConfig) WithTZ

func (c DBConfig) WithTZ(tz string) DBConfig

func (DBConfig) WithUser

func (c DBConfig) WithUser(user string) DBConfig

Jump to

Keyboard shortcuts

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