Documentation
¶
Index ¶
Constants ¶
View Source
const ( // KeyAuthentication const KeyAuthentication = "key_authentication" // BasicAuthentication const BasicAuthentication = "basic_authentication" // OAuthAuthentication const OAuthAuthentication = "oauth_authentication" // AnyAuthentication const AnyAuthentication = "any_authentication" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthMethod ¶
type AuthMethod struct {
gorm.Model
Name string `json:"name"`
Description string `json:"description"`
Type string `json:"type"`
Endpoints string `json:"endpoints"`
}
AuthMethod struct
func (*AuthMethod) ConvertToJSON ¶
func (a *AuthMethod) ConvertToJSON() (string, error)
ConvertToJSON convert object to json
func (*AuthMethod) LoadFromJSON ¶
func (a *AuthMethod) LoadFromJSON(data []byte) error
LoadFromJSON update object from json
type BasicAuthData ¶
type BasicAuthData struct {
gorm.Model
Name string `json:"name"`
Username string `json:"username"`
Password string `json:"password"`
Meta string `json:"meta"`
AuthMethodID int `json:"authMethodID"`
AuthMethod AuthMethod `json:"authMethod" gorm:"foreignKey:AuthMethodID,constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
}
BasicAuthData struct
func (*BasicAuthData) ConvertToJSON ¶
func (b *BasicAuthData) ConvertToJSON() (string, error)
ConvertToJSON convert object to json
func (*BasicAuthData) LoadFromJSON ¶
func (b *BasicAuthData) LoadFromJSON(data []byte) error
LoadFromJSON update object from json
type KeyBasedAuthData ¶
type KeyBasedAuthData struct {
gorm.Model
Name string `json:"name"`
APIKey string `json:"apiKey"`
Meta string `json:"meta"`
AuthMethodID int `json:"authMethodID"`
AuthMethod AuthMethod `json:"authMethod" gorm:"foreignKey:AuthMethodID,constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
}
KeyBasedAuthData struct
func (*KeyBasedAuthData) ConvertToJSON ¶
func (k *KeyBasedAuthData) ConvertToJSON() (string, error)
ConvertToJSON convert object to json
func (*KeyBasedAuthData) LoadFromJSON ¶
func (k *KeyBasedAuthData) LoadFromJSON(data []byte) error
LoadFromJSON update object from json
type OAuthAccessData ¶
type OAuthAccessData struct {
gorm.Model
AccessToken string `json:"accessToken"`
Meta string `json:"meta"`
ExpireAt time.Time `json:"expireAt"`
OAuthDataID int `json:"oauthDataID"`
OAuthData OAuthData `json:"oauthData" gorm:"foreignKey:OAuthDataID,constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
}
OAuthAccessData struct
func (*OAuthAccessData) ConvertToJSON ¶
func (b *OAuthAccessData) ConvertToJSON() (string, error)
ConvertToJSON convert object to json
func (*OAuthAccessData) LoadFromJSON ¶
func (b *OAuthAccessData) LoadFromJSON(data []byte) error
LoadFromJSON update object from json
type OAuthData ¶
type OAuthData struct {
gorm.Model
Name string `json:"name"`
ClientID string `json:"clientID"`
ClientSecret string `json:"clientSecret"`
Meta string `json:"meta"`
AuthMethodID int `json:"authMethodID"`
AuthMethod AuthMethod `json:"authMethod" gorm:"foreignKey:AuthMethodID,constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
}
OAuthData struct
func (*OAuthData) ConvertToJSON ¶
ConvertToJSON convert object to json
func (*OAuthData) LoadFromJSON ¶
LoadFromJSON update object from json
type Option ¶
Option struct
func (*Option) ConvertToJSON ¶
ConvertToJSON convert object to json
func (*Option) LoadFromJSON ¶
LoadFromJSON update object from json
Click to show internal directories.
Click to hide internal directories.