Documentation ¶
Index ¶
- Constants
- func ErrorToManyNetworks(w http.ResponseWriter, networks *[]string)
- func GetBody(r *http.Request, v any) error
- func IfRole(r *http.Request, roles []string) bool
- func IfRoleOrUser(r *http.Request, role, user string) bool
- func NewJob(w http.ResponseWriter, newJob *job.Job, jobOwner string)
- func OutputDemoAlreadyExists(w http.ResponseWriter)
- func OutputDemoDoesNotExists(w http.ResponseWriter)
- func OutputInvalidID(w http.ResponseWriter)
- func OutputInvalidPermission(w http.ResponseWriter)
- func OutputServerError(w http.ResponseWriter, err string)
- func OutputUserInputError(w http.ResponseWriter, err string)
- func ReadingBodyFailed(w http.ResponseWriter, err error)
- type JsonResponse
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 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)
Click to show internal directories.
Click to hide internal directories.