Documentation ¶
Index ¶
Constants ¶
View Source
const ( Authorization = "Authorization" ContentType = "Content-Type" ApplicationJson = "application/json" )
Variables ¶
This section is empty.
Functions ¶
func ShouldEnterRunMode ¶
func ShouldEnterRunMode(rm RUN_MODE_TYPE) bool
convert to interface and client
Types ¶
type INSTRUCTION_TYPE ¶
type INSTRUCTION_TYPE string
const (
INSTRUCTION_TYPE_CMD INSTRUCTION_TYPE = "INSTRUCTION_TYPE_CMD"
)
type Instruction ¶
type Instruction struct {
Commands []string `json:"commands" xml:"commands" form:"commands" validate:"required"`
}
type InstructionOutput ¶
type MaintenanceModeOpts ¶
type MaintenanceModeOpts struct {
RunModeOpts RunModeOpts
}
func NewMaintenanceMode ¶
func NewMaintenanceMode(c config.Config) (*MaintenanceModeOpts, error)
func (*MaintenanceModeOpts) Close ¶
func (mmo *MaintenanceModeOpts) Close(c *fiber.Ctx) error
func (*MaintenanceModeOpts) EnterMaintenanceMode ¶
func (mmo *MaintenanceModeOpts) EnterMaintenanceMode() error
func (*MaintenanceModeOpts) Patch ¶
func (mmo *MaintenanceModeOpts) Patch(c *fiber.Ctx) error
type PatchApiResponse ¶
type PatchApiResponse struct { Message string `json:"message" xml:"message" form:"message"` Status string `json:"status" xml:"status" form:"status"` CommandOutputs []InstructionOutput `json:"commandOutputs" xml:"commandOutputs" form:"commandOutputs"` Error *string `json:"error" xml:"error" form:"error"` }
type RUN_MODE_TYPE ¶
type RUN_MODE_TYPE string
const ( RUN_MODE_MAINTENANCE RUN_MODE_TYPE = "RUN_MODE_MAINTENANCE" RUN_MODE_NORMAL RUN_MODE_TYPE = "RUN_MODE_NORMAL" RUN_MODE_UPGRADE RUN_MODE_TYPE = "RUN_MODE_UPGRADE" )
type RunInstructions ¶
type RunModeOpts ¶
type RunModeOpts struct { Users map[model.Identifier]*model.User Config config.Config // contains filtered or unexported fields }
func (*RunModeOpts) AuthenticateUser ¶
func (rmo *RunModeOpts) AuthenticateUser(requesterId model.Identifier, password string) (bool, *wdbErrors.WdbError)
Click to show internal directories.
Click to hide internal directories.