Documentation ¶
Index ¶
- func GetAWSS3Config(l *logger.Logger, id, secret, token, region, endpoint string, isMinio bool) *aws.Config
- func GetAWSS3ConfigNoCredentials(l *logger.Logger, region, endpoint string, isMinio bool) *aws.Config
- func GetAWSS3ConfigNoCredentialsZap(l *logger.ZapLogger, region, endpoint string, isMinio bool) *aws.Config
- func GetAWSS3ConfigZap(l *logger.ZapLogger, id, secret, token, region, endpoint string, isMinio bool) *aws.Config
- func GetAWSSESConfig(l *logger.Logger, id, secret, token, region, endpoint string) *aws.Config
- func GetAWSSESConfigNoCredentials(l *logger.Logger, region, endpoint string) *aws.Config
- func GetAWSSESConfigZap(l *logger.ZapLogger, id, secret, token, region, endpoint string) *aws.Config
- func GetAWSV2S3Config(l *logger.Logger, key, secret, sessionToken, region, endpoint string, ...) (aws.Config, error)
- func GetAWSV2S3ConfigNoCredentials(l *logger.Logger, region, endpoint string, isMinio bool) (aws.Config, error)
- func GetAWSV2S3ConfigNoCredentialsZap(l *logger.ZapLogger, region, endpoint string, isMinio bool) (aws.Config, error)
- func GetAWSV2S3ConfigZap(l *logger.ZapLogger, key, secret, sessionToken, region, endpoint string, ...) (aws.Config, error)
- func GetAWSV2SESConfig(l *logger.Logger, key, secret, sessionToken, region, endpoint string) (aws.Config, error)
- func GetAWSV2SESConfigNoCredentials(l *logger.Logger, region, endpoint string) (aws.Config, error)
- func GetAWSV2SESConfigNoCredentialsZap(l *logger.ZapLogger, region, endpoint string) (aws.Config, error)
- func GetAWSV2SESConfigZap(l *logger.ZapLogger, key, secret, sessionToken, region, endpoint string) (aws.Config, error)
- func GetDefaultGormConfig() *gorm.Config
- func GetSESConfigNoCredentialsZap(l *logger.ZapLogger, region, endpoint string) *aws.Config
- func NewAWSS3(o *session.Options, c *aws.Config) *s3.S3
- func NewAWSS3Downloader(s *session.Session) *s3manager.Downloader
- func NewAWSS3Session(o *session.Options) *session.Session
- func NewAWSS3Uploader(s *session.Session) *s3manager.Uploader
- func NewAWSSES(o *session.Options, c *aws.Config) *ses.SES
- func NewAWSV2S3(c *aws.Config, optFns ...func(*s3.Options)) *s3.Client
- func NewAWSV2S3Downloader(c manager.DownloadAPIClient, options ...func(*manager.Downloader)) *manager.Downloader
- func NewAWSV2S3Uploader(c manager.UploadAPIClient, options ...func(*manager.Uploader)) *manager.Uploader
- func NewAWSV2SES(c aws.Config, optFns ...func(*sesv2.Options)) *sesv2.Client
- func NewMySQL(c *MySQLConfig, gc *gorm.Config) *gorm.DB
- func NewPostgres(c *PostgresConfig, gc *gorm.Config) *gorm.DB
- func NewRedis(o *redis.Options) *redis.Client
- func NewSQLServer(c *SQLServerConfig, gc *gorm.Config) *gorm.DB
- func NewSlack(c *SlackConfig) *slack.Client
- type DBConfig
- type MySQLConfig
- type PostgresConfig
- type SQLServerConfig
- type SlackConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAWSS3Config ¶ added in v0.3.0
func GetAWSS3Config(l *logger.Logger, id, secret, token, region, endpoint string, isMinio bool) *aws.Config
GetAWSS3Config get config.
func GetAWSS3ConfigNoCredentials ¶ added in v0.3.0
func GetAWSS3ConfigNoCredentials(l *logger.Logger, region, endpoint string, isMinio bool) *aws.Config
GetAWSS3ConfigNoCredentials get no credentials config. If AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are environment variables and are in the execution environment, Credentials is not required.
func GetAWSS3ConfigNoCredentialsZap ¶ added in v0.3.0
func GetAWSS3ConfigNoCredentialsZap(l *logger.ZapLogger, region, endpoint string, isMinio bool) *aws.Config
GetAWSS3ConfigNoCredentialsZap get no credentials config. If AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are environment variables and are in the execution environment, Credentials is not required.
func GetAWSS3ConfigZap ¶ added in v0.3.0
func GetAWSS3ConfigZap(l *logger.ZapLogger, id, secret, token, region, endpoint string, isMinio bool) *aws.Config
GetAWSS3ConfigZap get config.
func GetAWSSESConfig ¶ added in v0.3.0
GetAWSSESConfig get config.
func GetAWSSESConfigNoCredentials ¶ added in v0.3.0
GetAWSSESConfigNoCredentials get no credentials config. If AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are environment variables and are in the execution environment, Credentials is not required.
func GetAWSSESConfigZap ¶ added in v0.3.0
func GetAWSSESConfigZap(l *logger.ZapLogger, id, secret, token, region, endpoint string) *aws.Config
GetAWSSESConfigZap get config.
func GetAWSV2S3Config ¶ added in v0.3.0
func GetAWSV2S3Config(l *logger.Logger, key, secret, sessionToken, region, endpoint string, isMinio bool) (aws.Config, error)
GetAWSV2S3Config get config.
func GetAWSV2S3ConfigNoCredentials ¶ added in v0.3.0
func GetAWSV2S3ConfigNoCredentials(l *logger.Logger, region, endpoint string, isMinio bool) (aws.Config, error)
GetAWSV2S3ConfigNoCredentials get no credentials config. If AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are environment variables and are in the execution environment, Credentials is not required.
func GetAWSV2S3ConfigNoCredentialsZap ¶ added in v0.3.0
func GetAWSV2S3ConfigNoCredentialsZap(l *logger.ZapLogger, region, endpoint string, isMinio bool) (aws.Config, error)
GetAWSV2S3ConfigNoCredentialsZap get no credentials config. If AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are environment variables and are in the execution environment, Credentials is not required.
func GetAWSV2S3ConfigZap ¶ added in v0.3.0
func GetAWSV2S3ConfigZap(l *logger.ZapLogger, key, secret, sessionToken, region, endpoint string, isMinio bool) (aws.Config, error)
GetAWSV2S3ConfigZap get config.
func GetAWSV2SESConfig ¶ added in v0.3.0
func GetAWSV2SESConfig(l *logger.Logger, key, secret, sessionToken, region, endpoint string) (aws.Config, error)
GetSESConfig get config.
func GetAWSV2SESConfigNoCredentials ¶ added in v0.3.0
GetSESConfigNoCredentials get no credentials config. If AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are environment variables and are in the execution environment, Credentials is not required.
func GetAWSV2SESConfigNoCredentialsZap ¶ added in v0.3.0
func GetAWSV2SESConfigNoCredentialsZap(l *logger.ZapLogger, region, endpoint string) (aws.Config, error)
GetAWSV2SESConfigNoCredentialsZap get no credentials config. If AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are environment variables and are in the execution environment, Credentials is not required.
func GetAWSV2SESConfigZap ¶ added in v0.3.0
func GetAWSV2SESConfigZap(l *logger.ZapLogger, key, secret, sessionToken, region, endpoint string) (aws.Config, error)
GetSESConfigZap get config.
func GetDefaultGormConfig ¶
GetDefaultGormConfig get default config.
func GetSESConfigNoCredentialsZap ¶ added in v0.0.28
GetAWSSESConfigNoCredentialsZap get no credentials config. If AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are environment variables and are in the execution environment, Credentials is not required.
func NewAWSS3Downloader ¶ added in v0.3.0
func NewAWSS3Downloader(s *session.Session) *s3manager.Downloader
NewAWSS3Downloader returns Downloader.
func NewAWSS3Session ¶ added in v0.3.0
NewAWSS3Session returns Session.
func NewAWSS3Uploader ¶ added in v0.3.0
NewAWSS3Uploader returns Uploader.
func NewAWSV2S3 ¶ added in v0.3.0
NewAWSS3 returns S3.
func NewAWSV2S3Downloader ¶ added in v0.3.0
func NewAWSV2S3Downloader(c manager.DownloadAPIClient, options ...func(*manager.Downloader)) *manager.Downloader
NewAWSV2S3Downloader returns Downloader.
func NewAWSV2S3Uploader ¶ added in v0.3.0
func NewAWSV2S3Uploader(c manager.UploadAPIClient, options ...func(*manager.Uploader)) *manager.Uploader
NewAWSV2S3Uploader returns Uploader.
func NewAWSV2SES ¶ added in v0.3.0
NewAWSV2 returns ses instance.
func NewMySQL ¶
func NewMySQL(c *MySQLConfig, gc *gorm.Config) *gorm.DB
NewMySQL returns an gorm db instance.
func NewPostgres ¶
func NewPostgres(c *PostgresConfig, gc *gorm.Config) *gorm.DB
NewPostgres returns an gorm db instance.
func NewSQLServer ¶
func NewSQLServer(c *SQLServerConfig, gc *gorm.Config) *gorm.DB
NewSQLServer returns an gorm db instance.
func NewSlack ¶
func NewSlack(c *SlackConfig) *slack.Client
NewSlack returns an SlackClient instance.
Types ¶
type DBConfig ¶
type DBConfig struct { // ConnMaxLifetime sets max life time(sec) ConnMaxLifetime time.Duration // ConnMaxIdletime sets max idle time(sec) ConnMaxIdletime time.Duration // MaxIdleConns sets idle connection MaxIdleConns int // MaxOpenConns sets max connection MaxOpenConns int }
DBConfig set configurations.
type MySQLConfig ¶
MySQLConfig sets configurations.
type PostgresConfig ¶
PostgresConfig sets configurations.
type SQLServerConfig ¶
SQLServerConfig sets configurations.
type SlackConfig ¶
type SlackConfig struct {
OauthAccessToken string
}
SlackConfig sets configurations.