web

package
v0.0.6-dev Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2022 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() remote.Actions

New() -initialize http client

Types

type WebClient

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

WebClient - go-resty and websocket client struct

func (*WebClient) AddPGP

func (c *WebClient) AddPGP(publickey string) error

AddPGP - add public key to vault pgp public keys

Statuses:
202 - success
500 - internal server error

func (*WebClient) Close

func (c *WebClient) Close() error

Close - close http connection

func (*WebClient) ConfirmPGP

func (c *WebClient) ConfirmPGP(publickey string) error

ConfirmPGP - configrm vault pgp public key

Statuses:
200 - success
500 - internal server error

func (*WebClient) Delete

func (c *WebClient) Delete() error

Delete - delete action

Statuses:
202 - deleted
500 - internal server error

func (*WebClient) GetLogs

func (c *WebClient) GetLogs() ([]models.Action, error)

GetLogs - get action logs

Statuses:
200 - success
202 - no logs
500 - internal server error

func (*WebClient) ListPGP

func (c *WebClient) ListPGP() ([]models.PGP, error)

ListPGP - get list of vault pgp public keys

Statuses:
200 - success
202 - not found
500 - internal server error

func (*WebClient) Login

func (c *WebClient) Login(username, password, public string) error

Login - login action

  Statuses:
  200 - login successfull
	 208 - PGP key not confirmed yet, but other users notified
  400 - wrong request
  401 - username or password not found
  403 - PGP key not confirmed
  500 - internal server error

func (*WebClient) NewStream

func (c *WebClient) NewStream() error

NewStream - initialize and start websocket connection

func (*WebClient) Pull

func (c *WebClient) Pull(checksum string) ([]byte, error)

Pull - get specific vrecion of vault

Statuses:
200 - success
202 - not found
500 - internal server error

func (*WebClient) Push

func (c *WebClient) Push(payload, hashsum string) error

Push - delete action

Statuses:
200 - saved
500 - internal server error

func (*WebClient) Register

func (c *WebClient) Register(username, password, public string) error

Register - signup action

Statuses:
201 - success
500 - internal server error

func (*WebClient) RevokePGP

func (c *WebClient) RevokePGP(publickey string) error

RevokePGP - revoke vault pgp public key

Statuses:
410 - success
500 - internal server error

func (*WebClient) Versions

func (c *WebClient) Versions() ([]models.Version, error)

Versions - get list of vault versions

Statuses:
200 - success
202 - not found
500 - internal server error

Jump to

Keyboard shortcuts

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