models

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2021 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const (
	MimeJSON = "application/json"
	MimeText = "text/plain"
	MimeHTML = "text/html"
)
View Source
const DefaultPageEnd = 100
View Source
const DefaultPageStart = 0
View Source
const DefaultValue = -1

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicUser

type BasicUser struct {
	ID          string
	FingerPrint string
	Username    string
	FullName    string
	CreatedAt   time.Time
}

func (*BasicUser) GetCreatedAt

func (bu *BasicUser) GetCreatedAt() time.Time

func (*BasicUser) GetFingerPrint

func (bu *BasicUser) GetFingerPrint() string

func (*BasicUser) GetFullName

func (bu *BasicUser) GetFullName() string

func (*BasicUser) GetId added in v1.4.0

func (bu *BasicUser) GetId() string

func (*BasicUser) GetToken

func (bu *BasicUser) GetToken() string

func (*BasicUser) GetUserdata

func (bu *BasicUser) GetUserdata() interface{}

func (*BasicUser) GetUsername

func (bu *BasicUser) GetUsername() string

type FieldCipherInput

type FieldCipherInput struct {
	JSON       map[string]interface{}
	Keys       []string `example:"0551F452ABE463A4"`
	SkipFields []string `example:""`
}

type FieldDecipherInput

type FieldDecipherInput struct {
	KeyFingerprint string
	EncryptedKey   string
	EncryptedJSON  map[string]interface{}
}

type GPGAddPrivateKeyReturn

type GPGAddPrivateKeyReturn struct {
	FingerPrint string `example:"0551F452ABE463A4"`
	PublicKey   string `` /* 2555-byte string literal not displayed */
}

type GPGDecryptData

type GPGDecryptData struct {
	AsciiArmoredData string `` /* 690-byte string literal not displayed */
	DataOnly         bool   `example:"true"`
}

type GPGDecryptedData

type GPGDecryptedData struct {
	FingerPrint          string `example:"C1CF31FB8C2A8B59"`
	Base64Data           string `example:"SGVsbG8gd29ybGQK"`
	Filename             string `example:"hello world.txt"`
	IsIntegrityProtected bool   `example:"false"`
	IsIntegrityOK        bool   `example:"false"`
}

type GPGDeletePrivateKeyReturn

type GPGDeletePrivateKeyReturn struct {
	Status string `example:"OK"`
}

type GPGEncryptData

type GPGEncryptData struct {
	FingerPrint string `example:"0551F452ABE463A4"`
	Base64Data  string `example:"SGVsbG8gd29ybGQK"`
	Filename    string `example:"hello world.txt"`
	DataOnly    bool   `example:"true"`
}

type GPGGenerateKeyData

type GPGGenerateKeyData struct {
	Identifier string `example:"John HUEBR <john@huebr.com>"`
	Password   string `example:"I think you will never guess"`
	Bits       int    `example:"4096"`
}

type GPGKey

type GPGKey struct {
	ID                     string   `json:"id,omitempty"`
	FullFingerprint        string   `example:"0551F452ABE463A4"`
	Names                  []string `example:"Remote Signer Test"`
	Emails                 []string `example:"test@quan.to"`
	KeyUids                []GPGKeyUid
	KeyBits                int      `example:"3072"`
	Subkeys                []string `example:""`
	AsciiArmoredPublicKey  string   `` /* 2555-byte string literal not displayed */
	AsciiArmoredPrivateKey string   `example:""`
	ParentKey              *GPGKey
}

func AsciiArmored2GPGKey

func AsciiArmored2GPGKey(asciiArmored string) (GPGKey, error)

func (*GPGKey) GetShortFingerPrint

func (key *GPGKey) GetShortFingerPrint() string

type GPGKeyUid

type GPGKeyUid struct {
	Name        string `example:"Remote Signer Test"`
	Email       string `example:"test@quan.to"`
	Description string `example:""`
}

type GPGSignData

type GPGSignData struct {
	FingerPrint string `example:"0551F452ABE463A4"`
	Base64Data  string `example:"SGVsbG8gd29ybGQK"`
}

type GPGUnlockKeyData

type GPGUnlockKeyData struct {
	FingerPrint string `example:"0551F452ABE463A4"`
	Password    string `example:"123456"`
}

type GPGVerifySignatureData

type GPGVerifySignatureData struct {
	Base64Data string `example:"SGVsbG8gd29ybGQK"`
	Signature  string `` /* 595-byte string literal not displayed */
}

type GPGVerifySignatureDataNonQuanto added in v1.5.0

type GPGVerifySignatureDataNonQuanto struct {
	Base64Data string `example:"SGVsbG8gd29ybGQK"`
	Signature  string `` /* 651-byte string literal not displayed */
}

Used only for documentation

type KeyInfo

type KeyInfo struct {
	FingerPrint           string `example:"0551F452ABE463A4"`
	Identifier            string `example:"Remote Signer Test <test@quan.to>"`
	Bits                  int    `example:"3072"`
	ContainsPrivateKey    bool   `example:"false"`
	PrivateKeyIsDecrypted bool   `example:"false"`
}

type KeyRingAddPrivateKeyData

type KeyRingAddPrivateKeyData struct {
	EncryptedPrivateKey string      `` /* 5305-byte string literal not displayed */
	SaveToDisk          bool        `example:"true"`
	Password            interface{} // Actually string, but we want to nil check it
}

type KeyRingDeletePrivateKeyData

type KeyRingDeletePrivateKeyData struct {
	FingerPrint string `example:"0551F452ABE463A4"`
}

type SKSAddKey

type SKSAddKey struct {
	PublicKey string `` /* 2555-byte string literal not displayed */
}

type User added in v1.4.0

type User struct {
	ID          string `json:"id,omitempty"`
	Fingerprint string
	Username    string
	Password    string
	FullName    string
	CreatedAt   time.Time
}

func (User) GetCreatedAt added in v1.4.0

func (u User) GetCreatedAt() time.Time

GetCreatedAt returns when the user was created

func (User) GetFingerprint added in v1.4.0

func (u User) GetFingerprint() string

GetFingerprint returns the user key fingerprint

func (User) GetFullName added in v1.4.0

func (u User) GetFullName() string

GetFullName returns the user full name

func (User) GetID added in v1.4.0

func (u User) GetID() string

GetID returns the id

func (User) GetUserdata added in v1.4.0

func (u User) GetUserdata() interface{}

GetUserdata returns the raw user data

func (User) GetUsername added in v1.4.0

func (u User) GetUsername() string

GetUsername returns the username

type UserToken

type UserToken struct {
	ID          string `json:"id,omitempty"`
	Fingerprint string
	Username    string
	Fullname    string
	Token       string
	CreatedAt   time.Time
	Expiration  time.Time
}

func (*UserToken) GetCreatedAt

func (ut *UserToken) GetCreatedAt() time.Time

func (*UserToken) GetFingerPrint

func (ut *UserToken) GetFingerPrint() string

GetFingerPrint returns the user key fingerprint

func (*UserToken) GetFingerprint added in v1.4.0

func (ut *UserToken) GetFingerprint() string

func (*UserToken) GetFullName

func (ut *UserToken) GetFullName() string

func (*UserToken) GetId added in v1.4.0

func (ut *UserToken) GetId() string

GetId returns the id

func (*UserToken) GetToken

func (ut *UserToken) GetToken() string

func (*UserToken) GetUserdata

func (ut *UserToken) GetUserdata() interface{}

func (*UserToken) GetUsername

func (ut *UserToken) GetUsername() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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