Documentation ¶
Overview ¶
Package disneyland is a generated protocol buffer package.
It is generated from these files:
disneyland.proto
It has these top-level messages:
Job ListOfJobs RequestWithId ListJobsRequest
Index ¶
- Constants
- Variables
- func RegisterDisneylandServer(s *grpc.Server, srv DisneylandServer)
- type DisneylandClient
- type DisneylandServer
- type DisneylandStorage
- func (storage *DisneylandStorage) Connect() error
- func (storage *DisneylandStorage) CreateJob(job *Job, creator User) (*Job, error)
- func (storage *DisneylandStorage) DeleteJob(id uint64, userProject string) (*Job, error)
- func (storage *DisneylandStorage) GetJob(id uint64) (*Job, error)
- func (storage *DisneylandStorage) ListJobs(howmany uint32, project string, kind string) (*ListOfJobs, error)
- func (storage *DisneylandStorage) PullJobs(howmany uint32, project string, kind string) (*ListOfJobs, error)
- func (storage *DisneylandStorage) UpdateJob(job *Job) (*Job, error)
- type DisneylandStorageConfig
- type Job
- func (*Job) Descriptor() ([]byte, []int)
- func (m *Job) GetId() uint64
- func (m *Job) GetInput() string
- func (m *Job) GetKind() string
- func (m *Job) GetMetadata() string
- func (m *Job) GetOutput() string
- func (m *Job) GetProject() string
- func (m *Job) GetStatus() Job_Status
- func (*Job) ProtoMessage()
- func (m *Job) Reset()
- func (m *Job) String() string
- type Job_Status
- type ListJobsRequest
- func (*ListJobsRequest) Descriptor() ([]byte, []int)
- func (m *ListJobsRequest) GetHowMany() uint32
- func (m *ListJobsRequest) GetKind() string
- func (m *ListJobsRequest) GetProject() string
- func (*ListJobsRequest) ProtoMessage()
- func (m *ListJobsRequest) Reset()
- func (m *ListJobsRequest) String() string
- type ListOfJobs
- type RequestWithId
- type Server
- func (s *Server) AuthFuncOverride(ctx context.Context, fullMethodName string) (context.Context, error)
- func (s *Server) CreateJob(ctx context.Context, in *Job) (*Job, error)
- func (s *Server) DeleteJob(ctx context.Context, in *RequestWithId) (*Job, error)
- func (s *Server) GetJob(ctx context.Context, in *RequestWithId) (*Job, error)
- func (s *Server) ListJobs(ctx context.Context, in *ListJobsRequest) (*ListOfJobs, error)
- func (s *Server) ModifyJob(ctx context.Context, in *Job) (*Job, error)
- func (s *Server) PullPendingJobs(ctx context.Context, in *ListJobsRequest) (*ListOfJobs, error)
- type User
Constants ¶
View Source
const LISTSTRQ_1 = `
SELECT id, project, status, metadata, input, output, kind
FROM jobs
WHERE
`
View Source
const PULLINGSTRQ_1 = `
WITH updatedPts AS (
WITH pulledPts AS (
SELECT id, project, kind
FROM jobs
WHERE status=$1
`
View Source
const PULLINGSTRQ_2 = `` /* 329-byte string literal not displayed */
Variables ¶
View Source
var Job_Status_name = map[int32]string{
0: "PENDING",
1: "PULLED",
2: "RUNNING",
3: "FAILED",
4: "COMPLETED",
}
View Source
var Job_Status_value = map[string]int32{
"PENDING": 0,
"PULLED": 1,
"RUNNING": 2,
"FAILED": 3,
"COMPLETED": 4,
}
Functions ¶
func RegisterDisneylandServer ¶
func RegisterDisneylandServer(s *grpc.Server, srv DisneylandServer)
Types ¶
type DisneylandClient ¶
type DisneylandClient interface { CreateJob(ctx context.Context, in *Job, opts ...grpc.CallOption) (*Job, error) GetJob(ctx context.Context, in *RequestWithId, opts ...grpc.CallOption) (*Job, error) ListJobs(ctx context.Context, in *ListJobsRequest, opts ...grpc.CallOption) (*ListOfJobs, error) ModifyJob(ctx context.Context, in *Job, opts ...grpc.CallOption) (*Job, error) PullPendingJobs(ctx context.Context, in *ListJobsRequest, opts ...grpc.CallOption) (*ListOfJobs, error) DeleteJob(ctx context.Context, in *RequestWithId, opts ...grpc.CallOption) (*Job, error) }
func NewDisneylandClient ¶
func NewDisneylandClient(cc *grpc.ClientConn) DisneylandClient
type DisneylandServer ¶
type DisneylandServer interface { CreateJob(context.Context, *Job) (*Job, error) GetJob(context.Context, *RequestWithId) (*Job, error) ListJobs(context.Context, *ListJobsRequest) (*ListOfJobs, error) ModifyJob(context.Context, *Job) (*Job, error) PullPendingJobs(context.Context, *ListJobsRequest) (*ListOfJobs, error) DeleteJob(context.Context, *RequestWithId) (*Job, error) }
type DisneylandStorage ¶
type DisneylandStorage struct { Config DisneylandStorageConfig // contains filtered or unexported fields }
func NewDisneylandStorage ¶
func NewDisneylandStorage(dbUri string) (*DisneylandStorage, error)
func (*DisneylandStorage) Connect ¶
func (storage *DisneylandStorage) Connect() error
func (*DisneylandStorage) CreateJob ¶
func (storage *DisneylandStorage) CreateJob(job *Job, creator User) (*Job, error)
func (*DisneylandStorage) DeleteJob ¶
func (storage *DisneylandStorage) DeleteJob(id uint64, userProject string) (*Job, error)
func (*DisneylandStorage) GetJob ¶
func (storage *DisneylandStorage) GetJob(id uint64) (*Job, error)
func (*DisneylandStorage) ListJobs ¶
func (storage *DisneylandStorage) ListJobs(howmany uint32, project string, kind string) (*ListOfJobs, error)
func (*DisneylandStorage) PullJobs ¶
func (storage *DisneylandStorage) PullJobs(howmany uint32, project string, kind string) (*ListOfJobs, error)
type DisneylandStorageConfig ¶
type DisneylandStorageConfig struct {
DatabaseURI string `json:"db_uri"`
}
type Job ¶
type Job struct { Project string `protobuf:"bytes,1,opt,name=project" json:"project,omitempty"` Id uint64 `protobuf:"varint,2,opt,name=id" json:"id,omitempty"` Kind string `protobuf:"bytes,3,opt,name=kind" json:"kind,omitempty"` Status Job_Status `protobuf:"varint,4,opt,name=status,enum=Job_Status" json:"status,omitempty"` Input string `protobuf:"bytes,5,opt,name=input" json:"input,omitempty"` Output string `protobuf:"bytes,6,opt,name=output" json:"output,omitempty"` Metadata string `protobuf:"bytes,7,opt,name=metadata" json:"metadata,omitempty"` }
func (*Job) Descriptor ¶
func (*Job) GetMetadata ¶
func (*Job) GetProject ¶
func (*Job) GetStatus ¶
func (m *Job) GetStatus() Job_Status
func (*Job) ProtoMessage ¶
func (*Job) ProtoMessage()
type Job_Status ¶
type Job_Status int32
const ( Job_PENDING Job_Status = 0 Job_PULLED Job_Status = 1 Job_RUNNING Job_Status = 2 Job_FAILED Job_Status = 3 Job_COMPLETED Job_Status = 4 )
func (Job_Status) EnumDescriptor ¶
func (Job_Status) EnumDescriptor() ([]byte, []int)
func (Job_Status) String ¶
func (x Job_Status) String() string
type ListJobsRequest ¶
type ListJobsRequest struct { HowMany uint32 `protobuf:"varint,1,opt,name=how_many,json=howMany" json:"how_many,omitempty"` Project string `protobuf:"bytes,2,opt,name=project" json:"project,omitempty"` Kind string `protobuf:"bytes,3,opt,name=kind" json:"kind,omitempty"` }
func (*ListJobsRequest) Descriptor ¶
func (*ListJobsRequest) Descriptor() ([]byte, []int)
func (*ListJobsRequest) GetHowMany ¶
func (m *ListJobsRequest) GetHowMany() uint32
func (*ListJobsRequest) GetKind ¶
func (m *ListJobsRequest) GetKind() string
func (*ListJobsRequest) GetProject ¶
func (m *ListJobsRequest) GetProject() string
func (*ListJobsRequest) ProtoMessage ¶
func (*ListJobsRequest) ProtoMessage()
func (*ListJobsRequest) Reset ¶
func (m *ListJobsRequest) Reset()
func (*ListJobsRequest) String ¶
func (m *ListJobsRequest) String() string
type ListOfJobs ¶
type ListOfJobs struct {
Jobs []*Job `protobuf:"bytes,1,rep,name=jobs" json:"jobs,omitempty"`
}
func (*ListOfJobs) Descriptor ¶
func (*ListOfJobs) Descriptor() ([]byte, []int)
func (*ListOfJobs) GetJobs ¶
func (m *ListOfJobs) GetJobs() []*Job
func (*ListOfJobs) ProtoMessage ¶
func (*ListOfJobs) ProtoMessage()
func (*ListOfJobs) Reset ¶
func (m *ListOfJobs) Reset()
func (*ListOfJobs) String ¶
func (m *ListOfJobs) String() string
type RequestWithId ¶
type RequestWithId struct {
Id uint64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
}
func (*RequestWithId) Descriptor ¶
func (*RequestWithId) Descriptor() ([]byte, []int)
func (*RequestWithId) GetId ¶
func (m *RequestWithId) GetId() uint64
func (*RequestWithId) ProtoMessage ¶
func (*RequestWithId) ProtoMessage()
func (*RequestWithId) Reset ¶
func (m *RequestWithId) Reset()
func (*RequestWithId) String ¶
func (m *RequestWithId) String() string
type Server ¶
type Server struct { Storage *DisneylandStorage SecretKey []byte }
func (*Server) AuthFuncOverride ¶
func (*Server) ListJobs ¶
func (s *Server) ListJobs(ctx context.Context, in *ListJobsRequest) (*ListOfJobs, error)
func (*Server) PullPendingJobs ¶
func (s *Server) PullPendingJobs(ctx context.Context, in *ListJobsRequest) (*ListOfJobs, error)
Click to show internal directories.
Click to hide internal directories.