common

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FakeNewAPI

func FakeNewAPI(ciph *Cipher)

Copy from data to new fields

Types

type Account

type Account struct {
	Id                 string  `json:"id"`
	Name               string  `json:"name"`
	Email              string  `json:"email"`
	MasterPasswordHash string  `json:"masterPasswordHash"`
	MasterPasswordHint string  `json:"masterPasswordHint"`
	Key                string  `json:"key"`
	KeyPair            KeyPair `json:"keys"`
	RefreshToken       string  `json:"-"`
	TwoFactorSecret    string  `json:"-"`
	Kdf                int     `json:"kdf"`
	KdfIterations      int     `json:"kdfIterations"`
}

func (Account) GetProfile

func (acc Account) GetProfile() Profile

type Cipher

type Cipher struct {
	Type                int
	FolderId            *string // Must be pointer to output null in json. Android app will crash if not null
	OrganizationId      *string
	Favorite            bool
	Edit                bool
	Id                  string
	Data                CipherData // deprecated TODO: Stop depending on this
	Attachments         []string
	OrganizationUseTotp bool
	RevisionDate        time.Time
	Object              string
	CollectionIds       []string

	Card       *string
	Fields     []string
	Identity   *string
	Login      Login
	Name       *string
	Notes      *string // Must be pointer to output null in json. Android app will crash if not null
	SecureNote SecureNote
}

The data we store and send to the client

type CipherData

type CipherData struct {
	Uri      *string
	Username *string
	Password *string
	Totp     *string // Must be pointer to output null in json. Android app will crash if not null
	Name     *string
	Notes    *string // Must be pointer to output null in json. Android app will crash if not null
	Fields   []string
	Uris     []Uri
}

func (*CipherData) Bytes

func (data *CipherData) Bytes() ([]byte, error)

type Data

type Data struct {
	Object string
	Data   interface{}
}

type Domains

type Domains struct {
	EquivalentDomains       []string
	GlobalEquivalentDomains []GlobalEquivalentDomains
	Object                  string
}

type Folder

type Folder struct {
	Id           string
	Name         string
	Object       string
	RevisionDate time.Time
}

type GlobalEquivalentDomains

type GlobalEquivalentDomains struct {
	Type     int
	Domains  []string
	Excluded bool
}

type KeyPair

type KeyPair struct {
	EncryptedPrivateKey string `json:"encryptedPrivateKey"`
	PublicKey           string `json:"publicKey"`
}

type Login

type Login struct {
	Password *string
	Totp     *string // Must be pointer to output null in json. Android app will crash if not null
	Uri      *string
	Uris     []Uri
	Username *string
}

type Profile

type Profile struct {
	Id                 string
	Name               *string
	Email              string
	EmailVerified      bool
	Premium            bool
	MasterPasswordHint *string
	Culture            string
	TwoFactorEnabled   bool
	Key                string
	PrivateKey         string
	SecurityStamp      *string
	Organizations      []string
	Object             string
}

type Proxy

type Proxy struct {
	VaultURL string
}

func (*Proxy) Handler

func (p *Proxy) Handler(w http.ResponseWriter, r *http.Request)

Proxy connections to vault server to avoid cros issues

type SecureNote

type SecureNote struct {
	Type int
}

type SyncData

type SyncData struct {
	Profile Profile
	Folders []Folder
	Ciphers []Cipher
	Domains Domains
	Object  string
}

type Uri

type Uri struct {
	Uri   *string
	Match *int
}

Jump to

Keyboard shortcuts

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