api

package
v0.0.0-...-dfaa8e5 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2021 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BadRequiredCodeField  = `field:%s`
	BadRequiredCodeCommon = `invalid_argument`
	MFARequiredCode       = `mfa_required`
	CaptchaRequiredCode   = `captcha_required`
	TemporaryLockedCode   = `login_temporary_locked`
	InvalidAuthTokenCode  = `auth_token_invalid`
	UnknownErrorCode      = `unknown_error`
)

Variables

This section is empty.

Functions

func InitChangePassword

func InitChangePassword(cfg *Server) error

func InitHealth

func InitHealth(cfg *Server) error

func InitLogin

func InitLogin(cfg *Server) error

func InitMFA

func InitMFA(cfg *Server) error

func InitManage

func InitManage(cfg *Server) error

func InitOauth2

func InitOauth2(cfg *Server) error

func InitPasswordLess

func InitPasswordLess(cfg *Server) error

func InitSafariHack

func InitSafariHack(cfg *Server) error

func SafariHack

func SafariHack(ctx echo.Context) error

func ZapLogger

func ZapLogger(log *zap.Logger) echo.MiddlewareFunc

Types

type Server

type Server struct {
	// Echo is instance of the Echo framework
	Echo *echo.Echo

	// ApiConfig is common http setting for the application like a port, timeouts & etc.
	ServerConfig *config.Server

	// RedisClient is Redis client.
	RedisHandler *redis.Client

	// HydraConfig contains settings for the public and admin url of the Hydra application.
	HydraConfig *config.Hydra

	// SessionConfig contains settings for the session.
	SessionConfig *config.Session

	// Registry is the registry service
	Registry service.InternalRegistry
}

Server is the instance of the application

func NewServer

func NewServer(c *ServerConfig) (*Server, error)

NewServer creates new instance of the application.

func (*Server) Start

func (s *Server) Start() error

type ServerConfig

type ServerConfig struct {
	// ApiConfig is common http setting for the application like a port, timeouts & etc.
	ApiConfig *config.Server

	// HydraConfig contains settings for the public and admin url of the Hydra application.
	HydraConfig *config.Hydra

	// HydraAdminApi is client of the Hydra for administration requests.
	HydraAdminApi *admin.Client

	// SessionConfig contains settings for the session.
	SessionConfig *config.Session

	// MfaService describes the interface for working with MFA micro-service.
	MfaService proto.MfaService

	// MgoSession describes the interface for working with Mongo session.
	MgoSession database.MgoSession

	// SessionStore is client for session storage.
	SessionStore *redistore.RediStore

	// RedisClient is Redis client.
	RedisClient *redis.Client

	// Mailer contains settings for the postman service
	Mailer *config.Mailer
}

ServerConfig contains common configuration parameters for start application server

type Template

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

Template is used to display HTML pages.

func (*Template) Render

func (t *Template) Render(w io.Writer, name string, data interface{}, ctx echo.Context) error

Jump to

Keyboard shortcuts

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