v0.0.0-...-54a701a Latest Latest

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

Go to latest
Published: Oct 10, 2023 License: MPL-2.0 Imports: 13 Imported by: 0




This section is empty.


View Source
var Files embed.FS


func GetGraphTemplateData

func GetGraphTemplateData() interface{}

func WriteArchive

func WriteArchive(w io.Writer, filenameBase string, state StateChange, rawData bool) (err error)


type Client

type Client struct {
	// contains filtered or unexported fields

func NewClient

func NewClient(config dsl.Config) *Client

func (*Client) Close

func (c *Client) Close()

func (*Client) RegisterReceiver

func (c *Client) RegisterReceiver(receiver chan StateChange)

func (*Client) SetEncryptionPassphrase

func (c *Client) SetEncryptionPassphrase(encryptionPassphrase string) error

func (*Client) SetPassphrase

func (c *Client) SetPassphrase(passphrase string) error

func (*Client) SetPassword

func (c *Client) SetPassword(password string) error

func (*Client) State

func (c *Client) State() StateChange

func (*Client) UnregisterReceiver

func (c *Client) UnregisterReceiver(receiver chan StateChange)

type Message

type Message struct {
	State string      `json:"state"`
	Data  interface{} `json:"data,omitempty"`

func GetStateMessage

func GetStateMessage(change StateChange) Message

func (Message) JSON

func (m Message) JSON() []byte

type MessageData

type MessageData struct {
	Summary       string          `json:"summary"`
	Bins          json.RawMessage `json:"bins"`
	BinsHistory   json.RawMessage `json:"bins_history"`
	ErrorsHistory json.RawMessage `json:"errors_history"`

type State

type State string
const (
	StateReady                        State = "ready"
	StatePasswordRequired             State = "password"
	StatePassphraseRequired           State = "passphrase"
	StateEncryptionPassphraseRequired State = "encryption-passphrase"
	StateLoading                      State = "loading"
	StateError                        State = "error"

type StateChange

type StateChange struct {
	State State

	Time          time.Time
	RawData       []byte
	Status        models.Status
	Bins          models.Bins
	BinsHistory   models.BinsHistory
	ErrorsHistory models.ErrorsHistory

	Fingerprint string

	Err error

Jump to

Keyboard shortcuts

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