v1alpha1

package
v0.0.0-...-922fce5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

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

func NewGoryaServiceHandler(ctx context.Context, svc GoryaServiceHandler) (string,
	http.Handler)

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 AddPolicyRequest struct {
	Name         string              `json:"name"`
	DisplayName  string              `json:"displayname,omitempty"`
	Tags         []map[string]string `json:"tags"`
	Projects     []models.Project    `json:"projects"`
	ScheduleName string              `json:"schedulename"`
	Provider     string              `json:"provider"`
}

type AddScheduleRequest

type AddScheduleRequest struct {
	Name        string  `json:"name"`
	DisplayName string  `json:"displayname,omitempty"`
	Dtype       string  `json:"dtype"`
	Corder      bool    `json:"corder"`
	Shape       []int   `json:"shape"`
	NdArray     [][]int `json:"__ndarray__"`
	TimeZone    string  `json:"timezone"`
}

type ChangeStateRequest

type ChangeStateRequest struct {
	Action        int    `json:"action"`
	Project       string `json:"project"`
	CredentialRef string `json:"credentialRef"`
	TagKey        string `json:"tagkey"`
	TagValue      string `json:"tagvalue"`
	Provider      string `json:"provider"`
}

type GetPolicyResponse

type GetPolicyResponse struct {
	models.Policy
}

type GetScheduleResponse

type GetScheduleResponse struct {
	Name        string  ` json:"name" gorm:"size:191;unique"`
	DisplayName string  `json:"displayname"`
	TimeZone    string  `json:"timezone"`
	Dtype       string  `json:"dtype"`
	Corder      bool    `json:"Corder"`
	Shape       []int   `json:"Shape"`
	NdArray     [][]int `json:"__ndarray__"`
}

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 ListResponseVerbose struct {
	Name string `json:"name"`
	//compatible with UI
	DisplayName string `json:"displayName"`
}

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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL