api

package
v0.0.0-...-71ad85e Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const DemoAlreadyExists string = "Demo Already Exists."
View Source
const DemoDoesNotExists string = "Demo Does Not Exist."
View Source
const InvalidID string = "Invalid ID."
View Source
const InvalidPerm string = "Invalid Permission."

Variables

This section is empty.

Functions

func ErrorToManyNetworks

func ErrorToManyNetworks(w http.ResponseWriter, networks *[]string)

func GetBody

func GetBody(r *http.Request, v any) error

func IfRole

func IfRole(r *http.Request, roles []string) bool

func IfRoleOrUser

func IfRoleOrUser(r *http.Request, role, user string) bool

func NewJob

func NewJob(w http.ResponseWriter, newJob *job.Job, jobOwner string)

func OutputDemoAlreadyExists

func OutputDemoAlreadyExists(w http.ResponseWriter)

func OutputDemoDoesNotExists

func OutputDemoDoesNotExists(w http.ResponseWriter)

func OutputInvalidID

func OutputInvalidID(w http.ResponseWriter)

func OutputInvalidPermission

func OutputInvalidPermission(w http.ResponseWriter)

func OutputServerError

func OutputServerError(w http.ResponseWriter, err string)

func OutputUserInputError

func OutputUserInputError(w http.ResponseWriter, err string)

func ReadingBodyFailed

func ReadingBodyFailed(w http.ResponseWriter, err error)

Types

type JsonResponse

type JsonResponse struct {
	Data any `json:"data"`
}

func (*JsonResponse) Output

func (j *JsonResponse) Output(w http.ResponseWriter)

Jump to

Keyboard shortcuts

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