secret

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SecretFieldNames = []string{"Username", "Credential", "URL", "LastUpdate", "LastUpdateBy", "Comment"}
View Source
var SecretHumanFieldNames = []string{"Username", "Credential", "URL", "Comment"}

Functions

func ConvertFromSecret

func ConvertFromSecret(secret Secret) map[string]interface{}

this function will convert the secret to map[string]interface {}

Types

type Secret

type Secret struct {
	Username     string    `json:"username"`
	Credential   string    `json:"credential"`
	URL          string    `json:"url,omitempty"` //optional
	Comment      string    `json:"comment"`
	LastUpdate   time.Time `json:"lastupdate"`
	LastUpdateBy string    `json:"lastupdateby"`
}

reset to this

func ConvertToSecret

func ConvertToSecret(object map[string]interface{}) (Secret, bool)

convert the map[string]interface {} to Secret return the secret and true if the conversion is successful otherwise return empty secret and false

func (Secret) String

func (s Secret) String() string

String method for the Secret struct

Jump to

Keyboard shortcuts

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