common

package
v0.41.12 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// those vars are used during the build --- linker (ld) bakes the values in
	AppVersion     string
	AppPepper      string
	VapidPublicKey string
)

Functions

func CallAPI

func CallAPI[T any](input CallInput, output *T) bool

func LoadUser added in v0.41.8

func LoadUser(encoded string, user *models.User) error

func ReadFile added in v0.41.2

func ReadFile(file app.Value) (data []byte, err error)

func SaveUser added in v0.41.8

func SaveUser(plain *string, user *models.User) error

Types

type CallInput

type CallInput struct {
	Method      string
	Url         string
	Data        interface{}
	CallerID    string
	PageNo      int
	HideReplies bool
}

type Toast added in v0.41.1

type Toast struct {
	AppContext *app.Context
	TLink      string
	TText      string
	TType      string
}

func (*Toast) Context added in v0.41.1

func (t *Toast) Context(ctx *app.Context) *Toast

func (*Toast) Dispatch added in v0.41.1

func (t *Toast) Dispatch(c interface{}, f func(*Toast, interface{}))
func (t *Toast) Link(link string) *Toast

func (*Toast) Text added in v0.41.1

func (t *Toast) Text(text string) *Toast

func (*Toast) Type added in v0.41.1

func (t *Toast) Type(typ string) *Toast

type ToastInterface added in v0.41.1

type ToastInterface interface {
	Dispatch() func(interface{})
	False() func(interface{})
}

Jump to

Keyboard shortcuts

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