pleasant

package
v0.0.0-...-eff9d30 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Backend

func Backend() *backend

Backend returns a private embedded struct of framework.Backend.

func FactoryType

func FactoryType(backendType logical.BackendType) logical.Factory

FactoryType is a wrapper func that allows the Factory func to specify the backend type for the mock backend plugin instance.

Types

type Attachment

type Attachment struct {
	CredentialObjectId string `json:"CredentialObjectId"`
	FileName           string `json:"FileName"`
	FileData           string `json:"FileData"`
}

type AuthSuccess

type AuthSuccess struct {
	AccessToken string `json:"access_token"`
	TokenType   string `json:"token_type"`
	ExpiresIn   uint   `json:"expires_in"`
}

type CommentPrompt

type CommentPrompt struct {
	AskForCommentOnViewPassword  bool `json:"AskForCommentOnViewPassword"`
	AskForCommentOnViewOffline   bool `json:"AskForCommentOnViewOffline"`
	AskForCommentOnModifyEntries bool `json:"AskForCommentOnModifyEntries"`
	AskForCommentOnMoveEntries   bool `json:"AskForCommentOnMoveEntries"`
	AskForCommentOnMoveFolders   bool `json:"AskForCommentOnMoveFolders"`
	AskForCommentOnModifyFolders bool `json:"AskForCommentOnModifyFolders"`
}

type Credential

type Credential struct {
	Id                         string            `json:"Id"`
	Name                       string            `json:"Name"`
	Password                   string            `json:"Password"`
	Username                   string            `json:"Username,omitempty"`
	Url                        string            `json:"Url,omitempty"`
	Notes                      string            `json:",omitempty"`
	GroupId                    string            `json:"GroupId"`
	Created                    string            `json:"Created"`
	Modified                   string            `json:"Modified"`
	Expires                    string            `json:",omitempty"`
	CustomUserFields           map[string]string `json:",omitempty"`
	CustomApplicationFields    map[string]string `json:",omitempty"`
	Attachments                []Attachment      `json:",omitempty"`
	UsageComment               string            `json:"UsageComment"`
	Tags                       []Tag             `json:",omitempty"`
	HasModifyEntriesAccess     bool              `json:"HasModifyEntriesAccess"`
	HasViewEntryContentsAccess bool              `json:"HasViewEntryContentsAccess"`
	CommentPrompts             CommentPrompt     `json:"CommentPrompts"`
}

type CredentialGroup

type CredentialGroup struct {
	Id                      string            `json:"Id"`
	Name                    string            `json:"Name"`
	ParentId                string            `json:"ParentId"`
	Notes                   string            `json:",omitempty"`
	Created                 string            `json:",omitempty"`
	Modified                string            `json:",omitempty"`
	Expires                 string            `json:",omitempty"`
	CustomUserFields        map[string]string `json:",omitempty"`
	CustomApplicationFields map[string]string `json:",omitempty"`
	Attachments             []Attachment      `json:",omitempty"`

	Children     []CredentialGroup
	Credentials  []Credential
	Tags         []Tag  `json:",omitempty"`
	UsageComment string `json:"UsageComment"`

	HasModifyEntriesAccess     bool `json:"HasModifyEntriesAccess"`
	HasViewEntryContentsAccess bool `json:"HasViewEntryContentsAccess"`
}

type Pleasant

type Pleasant struct {
	// contains filtered or unexported fields
}

func NewPleasant

func NewPleasant(backend logical.Backend) *Pleasant

func (*Pleasant) CreateCredential

func (p *Pleasant) CreateCredential(credential *Credential)

func (*Pleasant) CreateCredentialGroup

func (p *Pleasant) CreateCredentialGroup(group *CredentialGroup)

func (*Pleasant) DeleteCredential

func (p *Pleasant) DeleteCredential(credential *Credential)

func (*Pleasant) DeleteCredentialGroup

func (p *Pleasant) DeleteCredentialGroup(group *CredentialGroup)

func (*Pleasant) GetAccessToken

func (p *Pleasant) GetAccessToken() string

func (*Pleasant) Invalidate

func (p *Pleasant) Invalidate() *CredentialGroup

func (*Pleasant) Login

func (p *Pleasant) Login(url, username, password string) *Pleasant

func (*Pleasant) Logout

func (p *Pleasant) Logout()

func (*Pleasant) Read

func (p *Pleasant) Read(path string) (*CredentialGroup, *Credential)

func (*Pleasant) RequestAuth

func (p *Pleasant) RequestAuth(username string, password string) *AuthSuccess

func (*Pleasant) RequestCredential

func (p *Pleasant) RequestCredential(id string) *Credential

func (*Pleasant) RequestCredentialGroup

func (p *Pleasant) RequestCredentialGroup(id string) *CredentialGroup

func (*Pleasant) RequestCredentialPassword

func (p *Pleasant) RequestCredentialPassword(id string) string

func (*Pleasant) RequestRootCredentialGroup

func (p *Pleasant) RequestRootCredentialGroup(invalidate bool) *CredentialGroup

func (*Pleasant) UpdateCredential

func (p *Pleasant) UpdateCredential(credential *Credential)

func (*Pleasant) UpdateCredentialGroup

func (p *Pleasant) UpdateCredentialGroup(group *CredentialGroup)

type Tag

type Tag struct {
	Name string `json:"Name"`
}

Jump to

Keyboard shortcuts

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