encode_decode

package
v0.0.0-...-1a2a7be Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2017 License: GPL-3.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeComputeCreateExecutorRequest

func DecodeComputeCreateExecutorRequest(ctx context.Context, r *http.Request) (interface{}, error)

func DecodeComputeCreateExecutorResponse

func DecodeComputeCreateExecutorResponse(ctx context.Context, res *http.Response) (interface{}, error)

func DecodeComputeCreateProjectRequest

func DecodeComputeCreateProjectRequest(ctx context.Context, r *http.Request) (interface{}, error)

func DecodeComputeCreateProjectResponse

func DecodeComputeCreateProjectResponse(ctx context.Context, res *http.Response) (interface{}, error)

func DecodeComputeCreateTaskRequest

func DecodeComputeCreateTaskRequest(ctx context.Context, r *http.Request) (interface{}, error)

func DecodeComputeCreateTaskResponse

func DecodeComputeCreateTaskResponse(ctx context.Context, res *http.Response) (interface{}, error)

func DecodeComputeDeleteExecutorByIDResponse

func DecodeComputeDeleteExecutorByIDResponse(ctx context.Context, res *http.Response) (interface{}, error)

func DecodeComputeDeleteExecutorRequest

func DecodeComputeDeleteExecutorRequest(ctx context.Context, r *http.Request) (interface{}, error)

func DecodeComputeDeleteProjectByIDRequest

func DecodeComputeDeleteProjectByIDRequest(ctx context.Context, r *http.Request) (interface{}, error)

func DecodeComputeDeleteProjectByIDResponse

func DecodeComputeDeleteProjectByIDResponse(ctx context.Context, res *http.Response) (interface{}, error)

func DecodeComputeDeleteTaskRequest

func DecodeComputeDeleteTaskRequest(ctx context.Context, r *http.Request) (interface{}, error)

func DecodeComputeGetExecutorByIDRequest

func DecodeComputeGetExecutorByIDRequest(ctx context.Context, r *http.Request) (interface{}, error)

func DecodeComputeGetExecutorByIDResponse

func DecodeComputeGetExecutorByIDResponse(ctx context.Context, res *http.Response) (interface{}, error)

func DecodeComputeGetProjectByIDResponse

func DecodeComputeGetProjectByIDResponse(ctx context.Context, res *http.Response) (interface{}, error)

func DecodeComputeGetProjectRequest

func DecodeComputeGetProjectRequest(ctx context.Context, r *http.Request) (interface{}, error)

func DecodeComputeGetTaskRequest

func DecodeComputeGetTaskRequest(ctx context.Context, r *http.Request) (interface{}, error)

func DecodeComputeListExecutorsRequest

func DecodeComputeListExecutorsRequest(ctx context.Context, r *http.Request) (interface{}, error)

func DecodeComputeListExecutorsResponse

func DecodeComputeListExecutorsResponse(ctx context.Context, res *http.Response) (interface{}, error)

func DecodeComputeListProjectsRequest

func DecodeComputeListProjectsRequest(ctx context.Context, r *http.Request) (interface{}, error)

func DecodeComputeListProjectsResponse

func DecodeComputeListProjectsResponse(ctx context.Context, res *http.Response) (interface{}, error)

func DecodeComputePopReadyTaskRequest

func DecodeComputePopReadyTaskRequest(ctx context.Context, r *http.Request) (interface{}, error)

func DecodeComputePopReadyTaskResponse

func DecodeComputePopReadyTaskResponse(ctx context.Context, res *http.Response) (interface{}, error)

func DecodeComputeUpdateTaskByIDResponse

func DecodeComputeUpdateTaskByIDResponse(ctx context.Context, res *http.Response) (interface{}, error)

func DecodeComputeUpdateTaskRequest

func DecodeComputeUpdateTaskRequest(ctx context.Context, r *http.Request) (interface{}, error)

func DecodeExecutorBody2Executor

func DecodeExecutorBody2Executor(b ExecutorBody) *project.Executor

func DecodeExecutorsBody2Executors

func DecodeExecutorsBody2Executors(bs ExecutorsBody) []*project.Executor

func DecodeProjectBody2Project

func DecodeProjectBody2Project(b ProjectBody) *project.Project

func DecodeProjectsBody2Projects

func DecodeProjectsBody2Projects(bs ProjectsBody) []*project.Project

func DecodeTaskBody2Task

func DecodeTaskBody2Task(b TaskBody) *project.Task

func EncodeComputeCreateExecutorRequest

func EncodeComputeCreateExecutorRequest(ctx context.Context, r *http.Request, request interface{}) error

func EncodeComputeCreateProjectRequest

func EncodeComputeCreateProjectRequest(ctx context.Context, r *http.Request, request interface{}) error

func EncodeComputeCreateTaskRequest

func EncodeComputeCreateTaskRequest(ctx context.Context, r *http.Request, request interface{}) error

func EncodeComputeDeleteExecutorByIDRequest

func EncodeComputeDeleteExecutorByIDRequest(ctx context.Context, r *http.Request, request interface{}) error

func EncodeComputeDeleteProjectByIDRequest

func EncodeComputeDeleteProjectByIDRequest(ctx context.Context, r *http.Request, request interface{}) error

func EncodeComputeGetExecutorByIDRequest

func EncodeComputeGetExecutorByIDRequest(ctx context.Context, r *http.Request, request interface{}) error

func EncodeComputeGetProjectByIDRequest

func EncodeComputeGetProjectByIDRequest(ctx context.Context, r *http.Request, request interface{}) error

func EncodeComputeListExecutorsRequest

func EncodeComputeListExecutorsRequest(ctx context.Context, r *http.Request, request interface{}) error

func EncodeComputeListProjectsRequest

func EncodeComputeListProjectsRequest(ctx context.Context, r *http.Request, request interface{}) error

func EncodeComputePopReadyTaskRequest

func EncodeComputePopReadyTaskRequest(ctx context.Context, r *http.Request, request interface{}) error

func EncodeComputeUpdateTaskByIDRequest

func EncodeComputeUpdateTaskByIDRequest(ctx context.Context, r *http.Request, request interface{}) error

func EncodeError

func EncodeError(ctx context.Context, err error, w http.ResponseWriter)

func EncodeRequest

func EncodeRequest(ctx context.Context, r *http.Request, request interface{}) error

func EncodeResponse

func EncodeResponse(ctx context.Context, w http.ResponseWriter, code int, response interface{}) error

func MakeResponseEncoder

func MakeResponseEncoder(code int) func(context.Context, http.ResponseWriter, interface{}) error

Types

type ComputeCreateExecutorRequest

type ComputeCreateExecutorRequest struct {
	Name string `json:"name"`
	Pack string `json:"pack"`
	Data []byte `json:"data"`
}

type ComputeCreateExecutorResponse

type ComputeCreateExecutorResponse ExecutorBody

type ComputeCreateProjectRequest

type ComputeCreateProjectRequest struct {
	Name string
}

type ComputeCreateProjectResponse

type ComputeCreateProjectResponse ProjectBody

type ComputeCreateTaskRequest

type ComputeCreateTaskRequest struct {
	Name       string `json:"name"`
	ProjectID  string `json:"project_id"`
	ExecutorID string `json:"executor_id"`
	Data       []byte `json:"data"`
}

type ComputeCreateTaskResponse

type ComputeCreateTaskResponse TaskBody

type ComputeDeleteExecutorByIDRequest

type ComputeDeleteExecutorByIDRequest struct {
	ID string `json:"-"`
}

type ComputeDeleteExecutorByIDResponse

type ComputeDeleteExecutorByIDResponse struct{}

type ComputeDeleteProjectByIDRequest

type ComputeDeleteProjectByIDRequest struct {
	ID string
}

type ComputeDeleteProjectByIDResponse

type ComputeDeleteProjectByIDResponse struct{}

type ComputeDeleteTaskByIDRequest

type ComputeDeleteTaskByIDRequest struct {
	ID string
}

type ComputeDeleteTaskByIDResponse

type ComputeDeleteTaskByIDResponse struct{}

type ComputeGetExecutorByIDRequest

type ComputeGetExecutorByIDRequest struct {
	ID string `json:"-"`
}

type ComputeGetExecutorByIDResponse

type ComputeGetExecutorByIDResponse ExecutorBody

type ComputeGetProjectByIDRequest

type ComputeGetProjectByIDRequest struct {
	ID string
}

type ComputeGetProjectByIDResponse

type ComputeGetProjectByIDResponse ProjectBody

type ComputeGetTaskByIDRequest

type ComputeGetTaskByIDRequest struct {
	ID string
}

type ComputeGetTaskByIDResponse

type ComputeGetTaskByIDResponse TaskBody

type ComputeListExecutorsRequest

type ComputeListExecutorsRequest struct{}

type ComputeListExecutorsResponse

type ComputeListExecutorsResponse ExecutorsBody

type ComputeListProjectsRequest

type ComputeListProjectsRequest struct{}

type ComputeListProjectsResponse

type ComputeListProjectsResponse []ProjectBody

type ComputePopReadyTaskRequest

type ComputePopReadyTaskRequest struct{}

type ComputePopReadyTaskResponse

type ComputePopReadyTaskResponse TaskBody

type ComputeUpdateTaskByIDRequest

type ComputeUpdateTaskByIDRequest struct {
	ID     string
	Status string
}

type ComputeUpdateTaskByIDResponse

type ComputeUpdateTaskByIDResponse TaskBody

type ExecutorBody

type ExecutorBody struct {
	ID      string `json:"id"`
	OwnerID string `json:"owner_id"`
	Name    string `json:"name"`
	Pack    string `json:"pack"`
	Data    []byte `json:"data"`
}

func EncodeExecutor2ExecutorBody

func EncodeExecutor2ExecutorBody(e *project.Executor) ExecutorBody

type ExecutorsBody

type ExecutorsBody []ExecutorBody

func EncodeExecutors2ExecutorsBody

func EncodeExecutors2ExecutorsBody(es []*project.Executor) ExecutorsBody

type ProjectBody

type ProjectBody struct {
	ID      string     `json:"id"`
	OwnerID string     `json:"owner_id"`
	Name    string     `json:"name"`
	Tasks   []TaskBody `json:"tasks"`
}

func EncodeProject2ProjectBody

func EncodeProject2ProjectBody(p *project.Project) ProjectBody

type ProjectsBody

type ProjectsBody []ProjectBody

func EncodeProjects2ProjectsBody

func EncodeProjects2ProjectsBody(ps []*project.Project) ProjectsBody

type TaskBody

type TaskBody struct {
	ID         string `json:"id"`
	ProjectID  string `json:"project_id"`
	ExecutorID string `json:"executor_id"`
	Name       string `json:"name"`
	Status     string `json:"status"`
	Data       []byte `json:"data"`
}

func EncodeTask2TaskBody

func EncodeTask2TaskBody(j *project.Task) TaskBody

Jump to

Keyboard shortcuts

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