forms

package
v0.0.0-...-1af73ce Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2021 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationForm

type ApplicationForm struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Password    string `json:"password"`
}

ApplicationForm is a form for application

func (*ApplicationForm) Create

func (af *ApplicationForm) Create(idToken *auth.Token) (ret *models.Application, err error)

Create creates an application

func (*ApplicationForm) Update

func (af *ApplicationForm) Update(id uint, idToken *auth.Token) (ret *models.Application, err error)

Update updates an application

type CmdForm

type CmdForm struct {
	Name        string `json:"name"`
	AccessToken string `json:"accessToken"`
}

CmdForm is form for sound command

func (*CmdForm) Auth

func (cf *CmdForm) Auth(id uint) (ok bool, err error)

Auth authenticate cmd request

func (*CmdForm) GetSound

func (cf *CmdForm) GetSound() (sound *models.Sound, err error)

GetSound returns a sound

type UserForm

type UserForm struct {
	Name        string `json:"name"`
	Description string `json:"description"`
}

UserForm is form for user

func (*UserForm) Update

func (uf *UserForm) Update(id uint, idToken *auth.Token) (ret *models.User, err error)

Update updates a user with UserForm

type WSAuthForm

type WSAuthForm struct {
	Password string `json:"password"`
}

WSAuthForm is form for authentication of websocket

func (*WSAuthForm) Auth

func (wsf *WSAuthForm) Auth(id uint) (token string, err error)

Auth authenticate websocket connection

Jump to

Keyboard shortcuts

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