Documentation ¶
Index ¶
Constants ¶
View Source
const ( Sender = `no-reply@uspy.me` Name = `USPY` )
Email defaults
View Source
const ( VerificationSubject = `Verifique sua conta para usar o USPY =)` PasswordRecoverySubject = `Aqui está seu link de recuperação de senha do USPY =)` VerificationContent = `` /* 185-byte string literal not displayed */ PasswordRecoveryContent = `` /* 192-byte string literal not displayed */ )
Verification
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Domain string `envconfig:"USPY_DOMAIN" required:"true" default:"127.0.0.1"` Port string `envconfig:"USPY_PORT" required:"true" default:"8080"` // careful with this because cloud run must run on port 8080 JWTSecret string `envconfig:"USPY_JWT_SECRET" required:"true" default:"my_secret"` Mode string `envconfig:"USPY_MODE" required:"true" default:"local"` AESKey string `envconfig:"USPY_AES_KEY" required:"true" default:"71deb5a48500599862d9e2170a60f90194a49fa81c24eacfe9da15cb76ba8b11"` // only used in dev RateLimit string `envconfig:"USPY_RATE_LIMIT"` // see github.com/ulule/limiter for more info AuthEndpoint string `envconfig:"USPY_AUTH_ENDPOINT" required:"true" default:"127.0.0.1:8081"` FrontOriginHost string `envconfig:"USPY_FRONT_ORIGIN_HOST" default:"http://127.0.0.1:3000"` FirestoreKeyPath string `envconfig:"USPY_FIRESTORE_KEY"` MockFirestoreData bool `envconfig:"USPY_MOCK_FIRESTORE_DATA" default:"false"` ProjectID string `envconfig:"USPY_PROJECT_ID"` Mailjet // email verification is needed in production }
Config is the default configuration object, for more info see README.md
var Env Config
Env is the default variable for the environment to be loaded
func (Config) Identify ¶
Identify returns the type of the authentication being used by the configuration object
func (Config) IsUsingKey ¶
IsUsingKey returns whether a firestore key is being used to authenticate with Firestore
func (Config) IsUsingProjectID ¶
IsUsingProjectID returns whether the GCP Project ID is being used to authenticate with Firestore
type GeneralConfig ¶
type GeneralConfig interface {
Identify() string
}
GeneralConfig is the interface for an environment configuration. It has only one method that must identify the type of authentication used
type Mailjet ¶
type Mailjet struct { APIKey string `envconfig:"USPY_MAILJET_KEY"` Secret string `envconfig:"USPY_MAILJET_SECRET"` // contains filtered or unexported fields }
Mailjet is the email client object
Click to show internal directories.
Click to hide internal directories.