Documentation ¶
Index ¶
- func AuthHandler(cont *gin.Context)
- func AuthorizeRequest() gin.HandlerFunc
- func CORSMiddleware() gin.HandlerFunc
- func FieldHandler(c *gin.Context)
- func LoginHandler(cont *gin.Context)
- func RandToken(length int) string
- func Start(args []string)
- type Config
- type Credentials
- type GhostDB
- type Server
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthHandler ¶
AuthHandler handles authentication of a user and initiates a session.
func AuthorizeRequest ¶
func AuthorizeRequest() gin.HandlerFunc
AuthorizeRequest is used to authorize a request for a certain end-point group.// {{{
func CORSMiddleware ¶
func CORSMiddleware() gin.HandlerFunc
CORSMiddleware middleware witch headers for any RESTful requests// {{{
func FieldHandler ¶
FieldHandler is a rudementary handler for logged in users.
Types ¶
type Config ¶
type Config struct { Port string Host string KeyFile string Cred Credentials }
func (*Config) SetDefault ¶
func (config *Config) SetDefault()
type Credentials ¶
Credentials which stores google ids.
func (*Credentials) SetFromFile ¶
func (cred *Credentials) SetFromFile(keyf string) *conf.ApiError
type GhostDB ¶
type GhostDB struct {
Users []User
}
Click to show internal directories.
Click to hide internal directories.