server

package
v0.0.0-...-4f7ffea Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(database string, port int)

Types

type CountOnetimeResponse

type CountOnetimeResponse struct {
	Count int `json:"count"`
}

type EndExchangePayload

type EndExchangePayload struct {
	Prekey      []byte `json:"prekey"`
	OneTime     []byte `json:"onetime,omitempty"`
	Ephemeral   []byte `json:"ephemeral"`
	InitialData []byte `json:"initial_data"`
}

func (*EndExchangePayload) MarshalJSON

func (payload *EndExchangePayload) MarshalJSON() ([]byte, error)

type Message

type Message struct {
	From    []byte  `json:"from,omitempty"`
	To      []byte  `json:"to"`
	Payload Payload `json:"payload"`
}

type MessagePayload

type MessagePayload struct {
	Data []byte `json:"data"`
}

func (*MessagePayload) MarshalJSON

func (payload *MessagePayload) MarshalJSON() ([]byte, error)

type Payload

type Payload struct {
	Variant interface{} `json:"variant"`
}

func (Payload) MarshalJSON

func (payload Payload) MarshalJSON() ([]byte, error)

func (*Payload) UnmarshalJSON

func (payload *Payload) UnmarshalJSON(data []byte) error

type PrekeyRequest

type PrekeyRequest struct {
	Prekey []byte `json:"prekey"`
	Sig    []byte `json:"sig"`
}

type QueryExchangePayload

type QueryExchangePayload struct{}

func (*QueryExchangePayload) MarshalJSON

func (payload *QueryExchangePayload) MarshalJSON() ([]byte, error)

type SendBundleRequest

type SendBundleRequest struct {
	Bundle []byte `json:"bundle"`
	Sig    []byte `json:"sig"`
}

type SessionResponse

type SessionResponse struct {
	Prekey  []byte `json:"prekey"`
	Sig     []byte `json:"sig"`
	OneTime []byte `json:"onetime,omitempty"`
}

type StartExchangePayload

type StartExchangePayload struct {
	Prekey  []byte `json:"prekey"`
	Sig     []byte `json:"sig"`
	OneTime []byte `json:"onetime,omitempty"`
}

func (*StartExchangePayload) MarshalJSON

func (payload *StartExchangePayload) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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