Documentation ¶
Index ¶
Constants ¶
View Source
const (
BasicAuth string = "basic_auth"
)
View Source
const SecretKey = "credential_secret"
Variables ¶
This section is empty.
Functions ¶
func GetOrInitSecret ¶
func RegisterChangeEvent ¶
func RegisterChangeEvent(evt ChangeEvent)
func TriggerChangeEvent ¶
func TriggerChangeEvent(credentials *Credential)
Types ¶
type ChangeEvent ¶
type ChangeEvent func(credentials *Credential)
type Credential ¶
type Credential struct { orm.ORMObjectBase Name string `json:"name" elastic_mapping:"name:{type:keyword,copy_to:search_text}"` Type string `json:"type" elastic_mapping:"type:{type:keyword}"` Tags []string `json:"tags" elastic_mapping:"category:{type:keyword,copy_to:search_text}"` Payload map[string]interface{} `json:"payload" elastic_mapping:"payload:{type:object,enabled:false}"` Encrypt struct { Type string `json:"type"` Params map[string]interface{} `json:"params"` } `json:"encrypt" elastic_mapping:"encrypt:{type:object,enabled:false}"` SearchText string `` /* 138-byte string literal not displayed */ Invalid bool `json:"invalid" elastic_mapping:"invalid:{type:boolean}"` // contains filtered or unexported fields }
func (*Credential) Decode ¶
func (cred *Credential) Decode() (interface{}, error)
func (*Credential) DecodeBasicAuth ¶
func (cred *Credential) DecodeBasicAuth() (*model.BasicAuth, error)
func (*Credential) Encode ¶
func (cred *Credential) Encode() error
func (*Credential) SetSecret ¶
func (cred *Credential) SetSecret(secret []byte)
func (*Credential) Validate ¶
func (cred *Credential) Validate() error
Click to show internal directories.
Click to hide internal directories.