Documentation ¶
Index ¶
- func WriteResourceStatusResponse(code int, resource string, action string, err string, w http.ResponseWriter)
- type AuthEnabledResponse
- type ChartCreationBody
- type ConfigCreationBody
- type LogFileCreationBody
- type LogFileResponse
- type LoginParameters
- type LoginSuccess
- type ResourceStatusResponse
- type SheetCreationBody
- type SheetResponse
- type UidPathParam
- type UserCreationBody
- type WorkspaceCreationBody
- type WorkspaceResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthEnabledResponse ¶
type AuthEnabledResponse struct {
Enabled bool `json:"enabled"`
}
AuthEnabledResponse is the response body for the authEnabled endpoint swagger:model AuthEnabledResponse
type ChartCreationBody ¶
ChartCreationBody is the body needed to create a chart through rest swagger:parameters CreateChart UpdateChart
type ConfigCreationBody ¶
ConfigCreationBody is the body that is needed to create a new Config through rest swagger:parameters CreateConfig UpdateConfig
type LogFileCreationBody ¶
type LogFileCreationBody struct { // in:body Data struct { // required UUID string `json:"uuid" validate:"uuid"` Name string `json:"name" validate:"required"` Note string `json:"note"` } `json:"data"` }
LogFileCreationBody is a model for creating logfiles through rest This is used to validate the update request swagger:parameters UpdateLogFile CreateLogFile
type LogFileResponse ¶
type LogFileResponse struct { UUID string `json:"uuid"` Name string `json:"name"` Timestamp int64 `json:"timestamp"` Note string `json:"note"` Log string `json:"log"` }
LogFileResponse is a single logFile response model
This is used for returning a response with a single order as body ¶
swagger:response LogFileResponse
func GenerateLogResponse ¶
func GenerateLogResponse(logFile *models.LogFile, env *utils.Env) *LogFileResponse
GenerateLogResponse returns a new LogFileResponse filled with the actual note and log data
type LoginParameters ¶
type LoginParameters struct { Username string `json:"username" validate:"required"` Password string `json:"password" validate:"required"` RememberMe bool `json:"rememberMe"` }
LoginParameters is the body that is needed to login the user swagger:parameters Login
type LoginSuccess ¶
type LoginSuccess struct { Data struct { Token string `json:"token"` } }
LoginSuccess is successful loggingresponse
This is used for returning the new JWT token to to the user ¶
swagger:model LoginSuccessResponse
type ResourceStatusResponse ¶
type ResourceStatusResponse struct { // in: body Body struct { Code int `json:"code"` Resource string `json:"resource"` Action string `json:"action"` Error string `json:"error"` } `json:"body"` }
A error or success response model This is used to indicate errors or success messages
swagger:response ResourceStatusResponse
type SheetCreationBody ¶
SheetCreationBody is the body that is needed to create a new sheet through rest swagger:parameters CreateSheet UpdateSheet
type SheetResponse ¶
type SheetResponse struct { UUID string `json:"uuid"` Title string `json:"title"` Charts []models.Chart `json:"charts"` }
SheetResponse is a single logFile response model
This is used for returning a response with a single sheet object as body ¶
swagger:model SheetResponse
func GenerateSheetResponseObject ¶
func GenerateSheetResponseObject(sheet *models.Sheet, env *utils.Env) *SheetResponse
GenerateSheetResponseObject returns a SheetResponse object filled with actual chart data instead of id
type UidPathParam ¶
type UidPathParam struct { // in: path UUID string `json:"uuid"` }
type UserCreationBody ¶
UserCreationBody is the body needed to create a user through rest swagger:parameters CreateUser UpdateUser
type WorkspaceCreationBody ¶
WorkspaceCreationBody is a body that is needed to create workspaces through rest Parameters needed to create a sheet object swagger:parameters CreateWorkspace UpdateWorkspace
type WorkspaceResponse ¶
type WorkspaceResponse struct { UUID string `json:"uuid"` Title string `json:"title"` Sheets []*SheetResponse `json:"sheets"` }
WorkspaceResponse is a single logFile response model
This is used for returning a response with a single sheet object as body ¶
swagger:model WorkspaceResponse
func GenerateWorkspaceResponseObject ¶
func GenerateWorkspaceResponseObject(workspace *models.Workspace, env *utils.Env) *WorkspaceResponse
GenerateWorkspaceResponseObject returns a WorkSpaceResponse object filled with actual sheet and chart data instead of id