core

package
v0.0.0-...-6904822 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TokenSecret = []byte("secret message")

Functions

func BadRequest

func BadRequest(c echo.Context, msg string, err error) error

func NotFound

func NotFound(c echo.Context, msg string) error

func SendOK

func SendOK(c echo.Context, data any) error

func ServerError

func ServerError(c echo.Context, err error) error

Types

type DevSpace

type DevSpace struct {
	Name   *string `json:"name"`
	Pubkey *string `json:"pubkey"`
}

type KeyContext

type KeyContext struct {
	echo.Context
	SKey *core.SKey
	PKey *core.PKeyServer
}

type Message

type Message struct {
	From    *string `json:"from"`
	On      *string `json:"on"`
	To      *string `json:"to"`
	Keyword *string `json:"keyword"`
	Data    *string `json:"data"`
}

type Request

type Request struct {
	From   *string `json:"from"`
	On     *string `json:"on"`
	To     *string `json:"to"`
	Secret *string `json:"secret"`
}

type Response

type Response struct {
	Ok    bool `json:"ok"`
	Data  any  `json:"data"`
	Error any  `json:"error"`
}

type Tag

type Tag struct {
	Name     *string `json:"from"`
	Trapdoor *string `json:"trapdoor"`
}

type TokenClaims

type TokenClaims struct {
	Username string `json:"username"`
	jwt.RegisteredClaims
}

type User

type User struct {
	Username *string `json:"username"`
	Password *string `json:"password"`
	PubKey   *string `json:"pubkey"`
}

Jump to

Keyboard shortcuts

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