httpoo_types

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	URL_SIGNIN                  = "/api/" + group + "/auth/sign-in"
	URL_SIGNUP                  = "/api/" + group + "/auth/sign-up"
	URL_USER                    = "/api/" + group + "/auth/user"
	URL_VERIFY                  = "/api/" + group + "/auth/verify/:token" // /api/httpoo/auth/verify/access_token_here
	URL_FORGOT_PASSWORD         = "/api/" + group + "/auth/forgot-password"
	URL_CHANGE_PASSWORD         = "/api/" + group + "/auth/change-password/:auth_id"
	URL_RESET                   = "/api/" + group + "/auth/reset-password"
	URL_REMOVE                  = "/api/" + group + "/auth/remove"
	URL_IMPORT                  = "/api/" + group + "/auth/import"
	URL_RESEND_ACTIVATION_EMAIL = "/api/" + group + "/auth/resend-activation-email"
	URL_VALIDATE_TOKEN          = "/api/" + group + "/auth/validate-token"
	URL_REFRESH_TOKEN           = "/api/" + group + "/auth/refresh-token"
	URL_DELEGATE_GRANT          = "/api/" + group + "/auth/delegate-grant"
	URL_DELEGATE_REVOKE         = "/api/" + group + "/auth/delegate-revoke"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Authorization

type Authorization struct {
	Type  string `json:"type"`
	Value string `json:"value"`
}

type Database added in v0.1.1

type Database struct {
	Driver string `json:"driver"`
	Dsn    string `json:"dsn"`
}

type EndPoint

type EndPoint struct {
	Mode    string // api
	Version string // v1
	Group   string // commands
	Name    string // execute
}

EndPoint "/api/v1/commands/execute"

func EndPointParse

func EndPointParse(uri string) *EndPoint

func (*EndPoint) String

func (instance *EndPoint) String() string

type IRouteHandler

type IRouteHandler interface {
	Method() string
	Endpoint() *EndPoint
	Handle(ctx *fiber.Ctx) error
}

type WebServerSettings

type WebServerSettings struct {
	Enabled        bool                             `json:"enabled"`
	Http           map[string]interface{}           `json:"http"`
	Routing        []*WebServerSettingsRoute        `json:"routing"`
	Authentication *WebServerSettingsAuthentication `json:"authentication"`
}

func (*WebServerSettings) Map

func (instance *WebServerSettings) Map() map[string]interface{}

type WebServerSettingsAuthentication

type WebServerSettingsAuthentication struct {
	Enabled                         bool                                     `json:"enabled"`
	PasswordExpireInDays            int                                      `json:"password-expire-days"`
	AccountNotConfirmedExpireInDays int                                      `json:"account-not-confirmed-expire-days"`
	AccessTokenExpireInSeconds      int                                      `json:"access-token-expire-seconds"`
	AppBaseUrl                      string                                   `json:"app-base-url"`
	ApiBaseUrl                      string                                   `json:"api-base-url"`
	Security                        *WebServerSettingsAuthenticationSecurity `json:"security"`
	DirTemplates                    string                                   `json:"dir-templates"`
	DbUsersCollection               string                                   `json:"db-users-collection"`
	Postman                         *WebServerSettingsAuthenticationPostman  `json:"postman"`
	Routing                         *WebServerSettingsAuthenticationRouting  `json:"routing"`
}

type WebServerSettingsAuthenticationPostman

type WebServerSettingsAuthenticationPostman struct {
	Payload    map[string]interface{} `json:"payload"`
	ConfigMail map[string]interface{} `json:"config-mail"`
	ConfigSms  map[string]interface{} `json:"config-sms"`
}

type WebServerSettingsAuthenticationRouting

type WebServerSettingsAuthenticationRouting struct {
	AuthSignIn                *WebServerSettingsRouteAuth `json:"sign-in"`   // login
	AuthSignUp                *WebServerSettingsRouteAuth `json:"sign-up"`   // new user
	AuthUserGet               *WebServerSettingsRouteAuth `json:"user-get"`  // get user by access_token
	AuthUserPost              *WebServerSettingsRouteAuth `json:"user-post"` // update user data (not password+email)
	AuthVerify                *WebServerSettingsRouteAuth `json:"verify"`    // confirm account
	AuthForgotPassword        *WebServerSettingsRouteAuth `json:"forgot-password"`
	AuthChangePassword        *WebServerSettingsRouteAuth `json:"change-password"`
	AuthResetPassword         *WebServerSettingsRouteAuth `json:"reset-password"`
	AuthResendActivationEmail *WebServerSettingsRouteAuth `json:"resend-activation-email"`
	AuthRemove                *WebServerSettingsRouteAuth `json:"remove"`
	AuthImport                *WebServerSettingsRouteAuth `json:"import"`
	AuthValidateToken         *WebServerSettingsRouteAuth `json:"validate-token"`
	AuthRefreshToken          *WebServerSettingsRouteAuth `json:"refresh-token"`
	AuthGrantDelegation       *WebServerSettingsRouteAuth `json:"delegate-grant"`
	AuthRevokeDelegation      *WebServerSettingsRouteAuth `json:"delegate-revoke"`
}

func NewWebServerSettingsAuthenticationRouting

func NewWebServerSettingsAuthenticationRouting() *WebServerSettingsAuthenticationRouting

type WebServerSettingsAuthenticationSecurity

type WebServerSettingsAuthenticationSecurity struct {
	AppToken      string         `json:"app-token"`
	Authorization *Authorization `json:"authorization"`
}

func (*WebServerSettingsAuthenticationSecurity) Map

func (instance *WebServerSettingsAuthenticationSecurity) Map() map[string]interface{}

type WebServerSettingsRoute

type WebServerSettingsRoute struct {
	Method        string         `json:"method"`
	Endpoint      string         `json:"endpoint"`
	Authorization *Authorization `json:"authorization"`
	Database      *Database      `json:"database"`
}

type WebServerSettingsRouteAuth

type WebServerSettingsRouteAuth struct {
	WebServerSettingsRoute
	ParamsRequired []string `json:"params-required"`
	Params         []string `json:"params"`
}

Jump to

Keyboard shortcuts

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