Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ProjectContextKeys the project's context keys ProjectContextKeys = ContextKeys{ GothicProviderCtxKey: "provider", ProviderCtxKey: "gg-provider", UserCtxKey: "gg-auth-user", } )
Functions ¶
func MustGetBool ¶
Types ¶
type AuthProvider ¶
type AuthProvider struct { Provider string ClientKey string Secret string Domain string // If needed, like with auth0 Scopes []string }
AuthProvider defines the configuration for the Goth config
type ContextKey ¶
type ContextKey string
ContextKey defines a type for context keys shared in the app
type ContextKeys ¶
type ContextKeys struct { GothicProviderCtxKey ContextKey // Provider for Gothic library ProviderCtxKey ContextKey // Provider in Auth UserCtxKey ContextKey // User db object in Auth }
ContextKeys holds the context keys throughout the project
type JWTConfig ¶
type JWTConfig struct { Secret string Algorithm string AccessTokenExpire string RefreshTokenExpire string }
JWTConfig defines the options for JWT tokens
type MGDBConfig ¶
type MGDBConfig struct {
DSN string
}
MGDBConfig defines the configuration for the MongoDB config
type RedisConfig ¶
type ServerConfig ¶
type ServerConfig struct { Host string Port string URISchema string //http:// or https:// ApiVer string StaticPath string SessionSecret string CookiesDomain string JWT JWTConfig GraphQL GQLConfig MongoDB MGDBConfig Redis RedisConfig AuthProviders []AuthProvider }
ServerConfig defines the configuration of server
func (*ServerConfig) ListenEndpoint ¶
func (s *ServerConfig) ListenEndpoint() string
ListenEndpoint returns the endpoint string
func (*ServerConfig) RealSchemaVersioningEndpoint ¶
func (s *ServerConfig) RealSchemaVersioningEndpoint(path string) string
func (*ServerConfig) SchemaVersioningEndpoint ¶
func (s *ServerConfig) SchemaVersioningEndpoint(path string) string
SchemaVersioningEndpoint return the complete URI path
func (*ServerConfig) VersioningEndpoint ¶
func (s *ServerConfig) VersioningEndpoint(path string) string
VersioningEndpoint retruns the versioning api path, path should have "/" as prefix
Click to show internal directories.
Click to hide internal directories.