login

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logins map[string]*DSL = map[string]*DSL{}

Logins the loaded login widgets

Functions

func Export

func Export() error

Export export login api

func Load

func Load(cfg config.Config) error

Load load login

func LoadAndExport

func LoadAndExport(cfg config.Config) error

LoadAndExport load login

func LoadFile added in v0.10.3

func LoadFile(root string, file string) error

LoadFile by dsl file

Types

type ActionDSL

type ActionDSL struct {
	Process string        `json:"process,omitempty"`
	Args    []interface{} `json:"args,omitempty"`
}

ActionDSL the login action DSL

type DSL

type DSL struct {
	ID              string               `json:"id,omitempty"`
	Name            string               `json:"name,omitempty"`
	Action          ActionDSL            `json:"action,omitempty"`
	Layout          LayoutDSL            `json:"layout,omitempty"`
	ThirdPartyLogin []ThirdPartyLoginDSL `json:"thirdPartyLogin,omitempty"`
}

DSL the login DSL

type LayoutDSL

type LayoutDSL struct {
	Entry   string `json:"entry,omitempty"`
	Captcha string `json:"captcha,omitempty"`
	Cover   string `json:"cover,omitempty"`
	Slogan  string `json:"slogan,omitempty"`
	Site    string `json:"site,omitempty"`
}

LayoutDSL the login page layoutDSL

type ThirdPartyLoginDSL added in v0.10.3

type ThirdPartyLoginDSL struct {
	Title string `json:"title,omitempty"`
	Href  string `json:"href,omitempty"`
	Icon  string `json:"icon,omitempty"`
	Blank bool   `json:"blank,omitempty"`
}

ThirdPartyLoginDSL the thirdparty login url

Jump to

Keyboard shortcuts

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