context

package
v0.0.1-alpha5 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PostMethodSupported = "only post method is allowed"
	TokenError          = "token error"
	UnauthorizedAccess  = "unauthorized access"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	AppName string

	//Redis
	RedisURL      string
	RedisPassword string

	//JWT
	JWTSecret   string
	JWTExpireIn time.Duration

	//SMTP
	SMTPIdentity string
	SMTPUsername string
	SMTPPassword string
	SMTPHost     string
	SMTPAddress  string

	//DB
	DBUrl string

	//Firebase
	FirebaseAPIKey        string
	AndroidPackageName    string
	DomainURIPrefix       string
	ConfirmationEndpoint  string
	ResetPasswordEndpoint string

	//UserService
	ConfirmationEmailTemplate string

	DebugMode bool
	LogFormat string
}

Config holds our config structure

func LoadConfig

func LoadConfig(path string) *Config

LoadConfig load the config from path

type MessageService

type MessageService struct {
	AppName string
}

func NewMessageService

func NewMessageService(cfg *Config) *MessageService

func (*MessageService) CredentialsError

func (m *MessageService) CredentialsError() error

Jump to

Keyboard shortcuts

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