credential

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2025 License: AGPL-3.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 GetOrInitSecret() ([]byte, error)

func InitSecret

func InitSecret(ks keystore2.Keystore, secret []byte) error

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

Jump to

Keyboard shortcuts

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