models

package
v0.0.0-...-49b685b Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CreateUserMessage = 1
	WriteNoteMessage  = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateUser

type CreateUser struct {
	Credentials Credentials `json:"credentials"`
}

func (CreateUser) ToMessage

func (c CreateUser) ToMessage() Message

type Credentials

type Credentials struct {
	Login    string `json:"login"`
	Password string `json:"password"`
}

type GetNoteRequest

type GetNoteRequest struct {
	Credentials Credentials `json:"credentials"`
	Name        string      `json:"name"`
}

type Message

type Message struct {
	Data []byte `json:"data"`
	Type int    `json:"type"`
}

func (Message) ToString

func (m Message) ToString() string

type Note

type Note struct {
	Name string `json:"name"`
	Text string `json:"text"`
}

type PutNoteRequest

type PutNoteRequest struct {
	Credentials Credentials `json:"credentials"`
	Note        Note        `json:"note"`
}

type UserInfo

type UserInfo struct {
	Credentials Credentials `json:"credentials"`
	HomeDir     string      `json:"homeDir"`
}

type WriteNote

type WriteNote struct {
	Note
	Dir string `json:"dir"`
}

func (WriteNote) ToMessage

func (wc WriteNote) ToMessage() Message

Jump to

Keyboard shortcuts

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