config

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2020 License: MIT Imports: 6 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppSettings

type AppSettings struct {
	AppType   constants.AppType
	AppID     string
	AppSecret string

	VerificationToken string
	EncryptKey        string
}

func GetISVAppSettingsByEnv added in v1.0.1

func GetISVAppSettingsByEnv() *AppSettings

func GetInternalAppSettingsByEnv added in v1.0.1

func GetInternalAppSettingsByEnv() *AppSettings

func NewISVAppSettings

func NewISVAppSettings(appID, appSecret, verificationToken, eventEncryptKey string) *AppSettings

func NewInternalAppSettings

func NewInternalAppSettings(appID, appSecret, verificationToken, eventEncryptKey string) *AppSettings

type Config

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

func ByCtx

func ByCtx(ctx context.Context) *Config

func NewConfig

func NewConfig(domain constants.Domain, appSettings *AppSettings, logger log.Logger, logLevel log.Level, store store.Store) *Config

func NewTestConfig

func NewTestConfig(domain constants.Domain, appSettings *AppSettings) *Config

func (*Config) GetAppSettings

func (c *Config) GetAppSettings() *AppSettings

func (*Config) GetDomain

func (c *Config) GetDomain() string

func (*Config) GetLogger

func (c *Config) GetLogger() log.Logger

func (*Config) GetStore

func (c *Config) GetStore() store.Store

func (*Config) WithContext

func (c *Config) WithContext(ctx *core.Context)

Jump to

Keyboard shortcuts

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