servermessages

package
v2.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Challenge

type Challenge struct {
	Payload string `json:"payload"`
}

type ErrorPayload

type ErrorPayload struct {
	ID     string      `json:"id,omitempty"`
	Code   string      `json:"code,omitempty"`
	Title  string      `json:"title,omitempty"`
	Detail string      `json:"detail,omitempty"`
	Meta   interface{} `json:"meta,omitempty"`
}

type Message

type Message struct {
	Type string      `json:"type"`
	Data interface{} `json:"data"`
}

func CreateClientError

func CreateClientError(payload ErrorPayload) Message

func CreateServerChallenge

func CreateServerChallenge(payload string) Message

func CreateServerError

func CreateServerError(payload ErrorPayload) Message

type MessageNoData

type MessageNoData struct {
	Type string `json:"type"`
}

func CreateAuthorizedMessage

func CreateAuthorizedMessage() MessageNoData

Jump to

Keyboard shortcuts

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