Documentation ¶
Index ¶
- Constants
- func NewGoryaServiceHandler(ctx context.Context, svc GoryaServiceHandler) (string, http.Handler)
- type AddPolicyRequest
- type AddScheduleRequest
- type ChangeStateRequest
- type GetPolicyResponse
- type GetScheduleResponse
- type GetTimeZoneResponse
- type GetVersionInfoResponse
- type GoryaServiceHandler
- type ListPolicyResponseVerbose
- type ListPolicyResponsesVerbose
- type ListResponse
- type ListResponseVerbose
- type ListResponsesVerbose
- type OkResponse
- type VersionInfo
Constants ¶
View Source
const ( GoryaTaskChangeStageProcedure = "/tasks/change_state" GoryaTaskScheduleProcedure = "/tasks/schedule" GoryaGetTimeZoneProcedure = "/api/v1alpha1/time_zones" GoryaAddScheduleProcedure = "/api/v1alpha1/add_schedule" GoryaGetScheduleProcedure = "/api/v1alpha1/get_schedule" GoryaListScheduleProcedure = "/api/v1alpha1/list_schedules" GoryaDeleteScheduleProcedure = "/api/v1alpha1/del_schedule" GoryaAddPolicyProcedure = "/api/v1alpha1/add_policy" GoryaGetPolicyProcedure = "/api/v1alpha1/get_policy" GoryaListPolicyProcedure = "/api/v1alpha1/list_policies" GoryaDeletePolicyProcedure = "/api/v1alpha1/del_policy" GoryaGetVersionInfo = "/api/v1alpha1/version_info" )
Variables ¶
This section is empty.
Functions ¶
func NewGoryaServiceHandler ¶
NewGoryaServiceHandler builds an HTTP handler from the service implementation. It returns the
path on which to mount the handler and the handler itself.
Types ¶
type AddPolicyRequest ¶
type AddScheduleRequest ¶
type ChangeStateRequest ¶
type GetPolicyResponse ¶
type GetScheduleResponse ¶
type GetTimeZoneResponse ¶
type GetTimeZoneResponse struct {
TimeZones []string `json:"Timezones,omitempty"`
}
type GetVersionInfoResponse ¶
type GetVersionInfoResponse struct {
VersionInfo *VersionInfo `json:"version_info,omitempty"`
}
type GoryaServiceHandler ¶
type GoryaServiceHandler interface { GetTimeZone() http.HandlerFunc GetVersionInfo() http.HandlerFunc AddSchedule(ctx context.Context) http.HandlerFunc GetSchedule(ctx context.Context) http.HandlerFunc ListSchedule(ctx context.Context) http.HandlerFunc DeleteSchedule(ctx context.Context) http.HandlerFunc AddPolicy(ctx context.Context) http.HandlerFunc GetPolicy(ctx context.Context) http.HandlerFunc ListPolicy(ctx context.Context) http.HandlerFunc DeletePolicy(ctx context.Context) http.HandlerFunc ChangeState(ctx context.Context) http.HandlerFunc ScheduleTask(ctx context.Context) http.HandlerFunc }
type ListPolicyResponseVerbose ¶
type ListPolicyResponseVerbose struct { ListResponseVerbose Provider string `json:"provider"` }
type ListPolicyResponsesVerbose ¶
type ListPolicyResponsesVerbose []ListPolicyResponseVerbose
type ListResponse ¶
type ListResponse []string
type ListResponseVerbose ¶
type ListResponsesVerbose ¶
type ListResponsesVerbose []ListResponseVerbose
type OkResponse ¶
type OkResponse struct {
Message string `json:"message"`
}
type VersionInfo ¶
type VersionInfo struct { Version string ` json:"version,omitempty"` GitCommit string `json:"git_commit,omitempty"` GitTreeDirty bool `json:"git_tree_dirty,omitempty"` BuildTime time.Time `json:"build_time,omitempty"` GoVersion string `json:"go_version,omitempty"` Compiler string `json:"compiler,omitempty"` Platform string `json:"platform,omitempty"` }
Click to show internal directories.
Click to hide internal directories.