Documentation ¶
Index ¶
- Constants
- Variables
- type Attachment
- type AttachmentTempFile
- type Bitwarden
- func (this *Bitwarden) CreateAttachment(of Item, attachmentName string, attachment Attachment) (gErr error)
- func (this *Bitwarden) DeleteAttachment(of Item, attachment ItemAttachmentReference) (gErr error)
- func (this *Bitwarden) Errorf(args []string, msg string, msgArgs ...interface{}) error
- func (this *Bitwarden) Execute(customizer CommandCustomizer, args ...string) ([]byte, error)
- func (this *Bitwarden) ExecuteAndUnmarshal(customizer CommandCustomizer, to interface{}, args ...string) error
- func (this *Bitwarden) ExecuteDirect(customizer CommandCustomizer, args ...string) ([]byte, string, error)
- func (this *Bitwarden) FindItem(q ItemQuery) (*Item, error)
- func (this *Bitwarden) FindItems(q ItemsQuery) (Items, error)
- func (this *Bitwarden) FormatArgs(args []string) string
- func (this *Bitwarden) GetAttachment(of Item, attachmentId string, base64encoded bool) (string, error)
- func (this *Bitwarden) GetAttachments(of Item, by ItemAttachmentQueries) (ItemAttachments, error)
- func (this *Bitwarden) GetItem(id string, aq ItemAttachmentQueries) (*Item, error)
- func (this *Bitwarden) Session() string
- func (this *Bitwarden) Status() (status Status, user string, err error)
- func (this *Bitwarden) Sync() error
- func (this *Bitwarden) Test() (bool, error)
- func (this *Bitwarden) Unlock(onlyIfRequired bool) error
- type CommandCustomizer
- type Item
- type ItemAttachmentQueries
- type ItemAttachmentQuery
- type ItemAttachmentReference
- type ItemAttachmentReferences
- type ItemAttachments
- type ItemField
- type ItemFields
- type ItemLogin
- type ItemLoginUri
- type ItemLoginUris
- type ItemQuery
- type Items
- type ItemsQuery
- type Status
Constants ¶
View Source
const ( StatusUnauthenticated = Status(0) StatusLocked = Status(1) StatusUnlocked = Status(2) )
Variables ¶
View Source
var ( ErrNotLoggedIn = errors.New("not logged in") ErrWrongSession = errors.New("BW_SESSION either wrong or expired") ErrNoSuchItem = errors.New("no such item") ErrItemNotUnique = errors.New("item not unique") DetailWrongSession = "" /* 204-byte string literal not displayed */ )
View Source
var (
ErrIllegalStatus = errors.New("illegal status")
)
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
type Attachment []byte
func (Attachment) String ¶
func (this Attachment) String() string
func (Attachment) ToReader ¶
func (this Attachment) ToReader() io.Reader
func (Attachment) ToTempFile ¶
func (this Attachment) ToTempFile(name string) (*AttachmentTempFile, error)
type AttachmentTempFile ¶
type AttachmentTempFile struct {
Name string
}
func (*AttachmentTempFile) Close ¶
func (this *AttachmentTempFile) Close() error
func (AttachmentTempFile) String ¶
func (this AttachmentTempFile) String() string
type Bitwarden ¶
type Bitwarden struct {
// contains filtered or unexported fields
}
func NewBitwarden ¶
func (*Bitwarden) CreateAttachment ¶
func (this *Bitwarden) CreateAttachment(of Item, attachmentName string, attachment Attachment) (gErr error)
func (*Bitwarden) DeleteAttachment ¶
func (this *Bitwarden) DeleteAttachment(of Item, attachment ItemAttachmentReference) (gErr error)
func (*Bitwarden) Execute ¶
func (this *Bitwarden) Execute(customizer CommandCustomizer, args ...string) ([]byte, error)
func (*Bitwarden) ExecuteAndUnmarshal ¶
func (this *Bitwarden) ExecuteAndUnmarshal(customizer CommandCustomizer, to interface{}, args ...string) error
func (*Bitwarden) ExecuteDirect ¶
func (*Bitwarden) FormatArgs ¶
func (*Bitwarden) GetAttachment ¶
func (*Bitwarden) GetAttachments ¶
func (this *Bitwarden) GetAttachments(of Item, by ItemAttachmentQueries) (ItemAttachments, error)
type CommandCustomizer ¶
type Item ¶
type Item struct { Object string `json:"object"` Id string `json:"id"` OrganizationId *string `json:"organizationId"` FolderId *string `json:"folderId"` Type int `json:"type"` Reprompt int `json:"reprompt"` Name string `json:"name"` Favorite bool `json:"favorite"` Fields ItemFields `json:"fields"` Login ItemLogin `json:"login"` CollectionIds []string `json:"collectionIds"` AttachmentReferences ItemAttachmentReferences `json:"attachments"` ResolvedAttachments ItemAttachments `json:"-"` RevisionDate *time.Time `json:"revisionDate"` }
func (*Item) ResolveAttachments ¶
func (this *Item) ResolveAttachments(by ItemAttachmentQueries, using *Bitwarden) error
func (Item) ToResponse ¶
type ItemAttachmentQueries ¶
type ItemAttachmentQueries []ItemAttachmentQuery
func (*ItemAttachmentQueries) Parse ¶
func (this *ItemAttachmentQueries) Parse(plain interface{}) error
type ItemAttachmentQuery ¶
type ItemAttachmentQuery struct { Name string FilenameMatches *regexp.Regexp Base64Encode bool Unique bool }
func (*ItemAttachmentQuery) Parse ¶
func (this *ItemAttachmentQuery) Parse(plain interface{}) error
type ItemAttachmentReference ¶
type ItemAttachmentReferences ¶
type ItemAttachmentReferences []ItemAttachmentReference
type ItemAttachments ¶
type ItemFields ¶
type ItemFields []ItemField
type ItemLogin ¶
type ItemLogin struct { Uris ItemLoginUris `json:"uris"` Username string `json:"username"` Password string `json:"password"` Totp string `json:"totp"` }
type ItemLoginUri ¶
type ItemLoginUris ¶
type ItemLoginUris []ItemLoginUri
func (ItemLoginUris) ToResponse ¶
func (this ItemLoginUris) ToResponse() []string
type ItemQuery ¶
type ItemQuery struct { Name string OrganizationId string CollectionId string FolderId string Attachments ItemAttachmentQueries OnTooBroadQuery func() }
type ItemsQuery ¶
type ItemsQuery struct { Search string OrganizationId string CollectionId string FolderId string Attachments ItemAttachmentQueries OnTooBroadQuery func() }
Click to show internal directories.
Click to hide internal directories.