Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FleetLockRequest ¶
type FleetLockRequest struct {
Client FleetLockRequestClient `json:"client_params"`
}
Wrapper struct for the request parameters. The actual parameters are stored in "client_params".
func ParseRequest ¶
func ParseRequest(body io.ReadCloser) (FleetLockRequest, error)
Parse an http request body and extract the parameters
type FleetLockRequestClient ¶
type FleetLockRequestClient struct {
// The unique id for the client.
// Generally this would be the zincati app id,
// meaning the unique machine id masked by the zincati app id.
ID string `json:"id"`
// This would be the group to which the client belongs.
// Zincati uses "default" here as a default value.
Group string `json:"group"`
}
The parameters for a fleetlock request. Needs to contain ID and group.
type FleetLockResponse ¶
type FleetLockResponse struct {
// The kind of response, should be something the client code can identify, e.g. success, error, etc.
Kind string `json:"kind"`
// Essentially the reason for the above kind, best to be log/user readable.
Value string `json:"value"`
}
The response sent by the server to the client. Please note that success or failure are indicated by the HTTP Status. These values here can be any arbitrary value and should mostly be used to display the failure reason in the logs.
func ParseResponse ¶
func ParseResponse(body io.ReadCloser) (FleetLockResponse, error)
Parse an http response body and extract the parameters
type FleetlockHealthResponse ¶
type FleetlockHealthResponse struct {
// The current status of the server. Should be indicated by a 200 response anyway.
// Should be "ok" if nothing is wrong
Status string `json:"status"`
// The specific error if there is a problem.
// Empty when there is no error.
Error string `json:"error"`
}
Not part of the actual api specification, used for the server to indicate it is up.
Click to show internal directories.
Click to hide internal directories.