Documentation
¶
Index ¶
- type AddScheduleRequest
- type CreateAPIKeyRequest
- type CreateAPIKeyResponse
- type DeleteAPIKeyRequest
- type DeleteScheduleRequest
- type DeployRequest
- type DeployResponse
- type DetaClient
- func (c *DetaClient) AddSchedule(req *AddScheduleRequest) error
- func (c *DetaClient) CreateAPIKey(req *CreateAPIKeyRequest) (*CreateAPIKeyResponse, error)
- func (c *DetaClient) DeleteAPIKey(req *DeleteAPIKeyRequest) error
- func (c *DetaClient) DeleteSchedule(req *DeleteScheduleRequest) error
- func (c *DetaClient) Deploy(r *DeployRequest) (*DeployResponse, error)
- func (c *DetaClient) DownloadProgram(req *DownloadProgramRequest) (*DownloadProgramResponse, error)
- func (c *DetaClient) GetLogs(req *GetLogsRequest) (*GetLogsResponse, error)
- func (c *DetaClient) GetProgDetails(req *GetProgDetailsRequest) (*GetProgDetailsResponse, error)
- func (c *DetaClient) GetProjects(req *GetProjectsRequest) (*GetProjectsResponse, error)
- func (c *DetaClient) GetSchedule(req *GetScheduleRequest) (*GetScheduleResponse, error)
- func (c *DetaClient) GetUserInfo() (*GetUserInfoResponse, error)
- func (c *DetaClient) InvokeProgram(req *InvokeProgRequest) (*InvokeProgResponse, error)
- func (c *DetaClient) ListSpaces() (ListSpacesResponse, error)
- func (c *DetaClient) NewProgram(r *NewProgramRequest) (*NewProgramResponse, error)
- func (c *DetaClient) UpdateAuth(req *UpdateAuthRequest) error
- func (c *DetaClient) UpdateProgDeps(req *UpdateProgDepsRequest) (*UpdateProgDepsResponse, error)
- func (c *DetaClient) UpdateProgEnvs(req *UpdateProgEnvsRequest) error
- func (c *DetaClient) UpdateProgName(req *UpdateProgNameRequest) error
- func (c *DetaClient) UpdateProgRuntime(req *UpdateProgRuntimeRequest) error
- func (c *DetaClient) UpdateVisorMode(req *UpdateVisorModeRequest) error
- type DownloadProgramRequest
- type DownloadProgramResponse
- type GetLogsRequest
- type GetLogsResponse
- type GetProgDetailsRequest
- type GetProgDetailsResponse
- type GetProjectsItem
- type GetProjectsRequest
- type GetProjectsResponse
- type GetScheduleRequest
- type GetScheduleResponse
- type GetUserInfoResponse
- type InvokeProgRequest
- type InvokeProgResponse
- type ListSpaceItem
- type ListSpacesResponse
- type LogType
- type NewProgramRequest
- type NewProgramResponse
- type UpdateAuthRequest
- type UpdateProgDepsRequest
- type UpdateProgDepsResponse
- type UpdateProgEnvsRequest
- type UpdateProgNameRequest
- type UpdateProgRuntimeRequest
- type UpdateVisorModeRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddScheduleRequest ¶
type AddScheduleRequest struct {
ProgramID string `json:"program_id"`
Type string `json:"type"`
Expression string `json:"expression"`
}
AddScheduleRequest request to add schedule/cron to a program
type CreateAPIKeyRequest ¶
type CreateAPIKeyRequest struct {
ProgramID string `json:"program_id"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
}
CreateAPIKeyRequest request to create an api key for a program
type CreateAPIKeyResponse ¶
type CreateAPIKeyResponse struct {
Name string `json:"name"`
Description string `json:"description,omitmepty"`
Prefix string `json:"prefix"`
APIKey string `json:"api_key"`
Created string `json:"created"`
}
CreateAPIKeyResponse response to create api key request
type DeleteAPIKeyRequest ¶
DeleteAPIKeyRequest request to delete an api key
type DeleteScheduleRequest ¶
type DeleteScheduleRequest struct {
ProgramID string
}
DeleteScheduleRequest request to delete a schedule/cron from a program
type DeployRequest ¶
type DeployRequest struct {
ProgramID string `json:"pid"`
Changes map[string]string `json:"change"`
Deletions []string `json:"delete"`
BinaryFiles map[string]string `json:"binary"`
Account string `json:"-"`
Region string `json:"-"`
}
DeployRequest deploy program request
type DeployResponse ¶
type DeployResponse struct {
ProgramID string `json:"program_id"`
}
DeployResponse deploy program response
type DetaClient ¶
type DetaClient struct {
// contains filtered or unexported fields
}
DetaClient client that talks with the deta api
func NewDetaClient ¶
func NewDetaClient() *DetaClient
NewDetaClient new client to talk with the deta api
func (*DetaClient) AddSchedule ¶
func (c *DetaClient) AddSchedule(req *AddScheduleRequest) error
AddSchedule add a schedule/cron to a program
func (*DetaClient) CreateAPIKey ¶
func (c *DetaClient) CreateAPIKey(req *CreateAPIKeyRequest) (*CreateAPIKeyResponse, error)
CreateAPIKey create an api key for your program
func (*DetaClient) DeleteAPIKey ¶
func (c *DetaClient) DeleteAPIKey(req *DeleteAPIKeyRequest) error
DeleteAPIKey delete an api key
func (*DetaClient) DeleteSchedule ¶
func (c *DetaClient) DeleteSchedule(req *DeleteScheduleRequest) error
DeleteSchedule delete a schedule from a program
func (*DetaClient) Deploy ¶
func (c *DetaClient) Deploy(r *DeployRequest) (*DeployResponse, error)
Deploy sends deploy request
func (*DetaClient) DownloadProgram ¶
func (c *DetaClient) DownloadProgram(req *DownloadProgramRequest) (*DownloadProgramResponse, error)
DownloadProgram download all program files
func (*DetaClient) GetLogs ¶
func (c *DetaClient) GetLogs(req *GetLogsRequest) (*GetLogsResponse, error)
func (*DetaClient) GetProgDetails ¶
func (c *DetaClient) GetProgDetails(req *GetProgDetailsRequest) (*GetProgDetailsResponse, error)
GetProgDetails get program details
func (*DetaClient) GetProjects ¶
func (c *DetaClient) GetProjects(req *GetProjectsRequest) (*GetProjectsResponse, error)
GetProjects gets projects
func (*DetaClient) GetSchedule ¶
func (c *DetaClient) GetSchedule(req *GetScheduleRequest) (*GetScheduleResponse, error)
GetSchedule get a schedule for a program
func (*DetaClient) GetUserInfo ¶
func (c *DetaClient) GetUserInfo() (*GetUserInfoResponse, error)
GetUserInfo gets user info
func (*DetaClient) InvokeProgram ¶
func (c *DetaClient) InvokeProgram(req *InvokeProgRequest) (*InvokeProgResponse, error)
InvokeProgram invoke lambda program
func (*DetaClient) ListSpaces ¶
func (c *DetaClient) ListSpaces() (ListSpacesResponse, error)
ListSpaces send list a spaces request
func (*DetaClient) NewProgram ¶
func (c *DetaClient) NewProgram(r *NewProgramRequest) (*NewProgramResponse, error)
NewProgram sends a new program request
func (*DetaClient) UpdateAuth ¶
func (c *DetaClient) UpdateAuth(req *UpdateAuthRequest) error
UpdateAuth update http auth (enable or disable) for a program
func (*DetaClient) UpdateProgDeps ¶
func (c *DetaClient) UpdateProgDeps(req *UpdateProgDepsRequest) (*UpdateProgDepsResponse, error)
UpdateProgDeps update program dependencies
func (*DetaClient) UpdateProgEnvs ¶
func (c *DetaClient) UpdateProgEnvs(req *UpdateProgEnvsRequest) error
UpdateProgEnvs update program environment variables
func (*DetaClient) UpdateProgName ¶
func (c *DetaClient) UpdateProgName(req *UpdateProgNameRequest) error
UpdateProgName update program name
func (*DetaClient) UpdateProgRuntime ¶
func (c *DetaClient) UpdateProgRuntime(req *UpdateProgRuntimeRequest) error
UpdateProgRuntime update program runtime
func (*DetaClient) UpdateVisorMode ¶
func (c *DetaClient) UpdateVisorMode(req *UpdateVisorModeRequest) error
UpdateVisorMode updates the visor mode for a program
type DownloadProgramRequest ¶
DownloadProgramRequest download program request
type DownloadProgramResponse ¶
type DownloadProgramResponse struct {
ZipFile []byte
}
DownloadProgramResponse download program response
type GetLogsRequest ¶
GetLogsRequest to a micro
type GetLogsResponse ¶
GetLogsResponse from a micro
type GetProgDetailsRequest ¶
GetProgDetailsRequest request to get program details
type GetProgDetailsResponse ¶
type GetProgDetailsResponse struct {
ID string `json:"id"`
Space int64 `json:"space"`
Runtime string `json:"runtime"`
Name string `json:"name"`
Path string `json:"path"`
Project string `json:"project"`
Account string `json:"account"`
Region string `json:"region"`
Deps []string `json:"deps"`
Envs []string `json:"envs"`
Public bool `json:"public"`
Visor string `json:"log_level"`
ScheduleID int64 `json:"schedule_id"`
}
GetProgDetailsResponse response to get program details
type GetProjectsItem ¶
type GetProjectsItem struct {
ID string `json:"id,omitempty"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
Created string `json:"created"`
}
GetProjectsItem an item in get projects response
type GetProjectsRequest ¶
type GetProjectsRequest struct {
SpaceID int64
}
GetProjectsRequest request to get your projects
type GetProjectsResponse ¶
type GetProjectsResponse struct {
Projects []*GetProjectsItem `json:"projects"`
}
GetProjectsResponse response to get projects request
type GetScheduleRequest ¶
type GetScheduleRequest struct {
ProgramID string
}
GetScheduleRequest request to get a schedule for a program
type GetScheduleResponse ¶
type GetScheduleResponse struct {
ScheduleID int64 `json:"id"`
Type string `json:"type"`
Expression string `json:"expression"`
}
GetScheduleResponse response to get schedule request
type GetUserInfoResponse ¶
type GetUserInfoResponse struct {
DefaultSpace int64
DefaultSpaceName string
DefaultProject string
}
GetUserInfoResponse response to GetUserInfo request
type InvokeProgRequest ¶
type InvokeProgRequest struct {
ProgramID string `json:"-"`
Action string `json:"action,omitempty"`
Body string `json:"body,omitempty"`
}
InvokeProgRequest request to invoke a program
type InvokeProgResponse ¶
InvokeProgResponse response to invoke program request
type ListSpaceItem ¶
type ListSpaceItem struct {
SpaceID int64 `json:"spaceID"`
Name string `json:"name"`
Role string `json:"role"`
}
ListSpaceItem an item in ListSpacesResponse
type ListSpacesResponse ¶
type ListSpacesResponse []ListSpaceItem
ListSpacesResponse response to list spaces request
type NewProgramRequest ¶
type NewProgramRequest struct {
Space int64 `json:"spaceID"`
Project string `json:"project"`
Group string `json:"group"`
Name string `json:"name"`
Runtime string `json:"runtime"`
Fork *string `json:"fork"`
}
NewProgramRequest request to create a new program
type NewProgramResponse ¶
type NewProgramResponse struct {
ID string `json:"id"`
Space int64 `json:"space"`
Runtime string `json:"runtime"`
Name string `json:"name"`
Path string `json:"path"`
Project string `json:"project"`
Account string `json:"account"`
Region string `json:"region"`
Deps []string `json:"deps"`
Envs []string `json:"envs"`
Public bool `json:"http_auth"`
Visor string `json:"log_level"`
}
NewProgramResponse response to a new program request
type UpdateAuthRequest ¶
UpdateAuthRequest request to update http auth for a program
type UpdateProgDepsRequest ¶
type UpdateProgDepsRequest struct {
ProgramID string `json:"program_id"`
Command string `json:"command"`
}
UpdateProgDepsRequest request to update program dependencies
type UpdateProgDepsResponse ¶
type UpdateProgDepsResponse struct {
Output string `json:"output"`
HasError bool `json:"-"` // if the output has error
}
UpdateProgDepsResponse response to update program dependencies request
type UpdateProgEnvsRequest ¶
type UpdateProgEnvsRequest struct {
ProgramID string
Account string
Region string
Vars map[string]*string
}
UpdateProgEnvsRequest request to update program envs
type UpdateProgNameRequest ¶
UpdateProgNameRequest request to update program name
type UpdateProgRuntimeRequest ¶
type UpdateProgRuntimeRequest struct {
ProgramID string `json:"-"`
Runtime string `json:"runtime"`
}
UpdateProgRuntimeRequest request to update program runtime
type UpdateVisorModeRequest ¶
UpdateVisorModeRequest request to update visor mode