Documentation ¶
Overview ¶
Package services is a generated protocol buffer package.
It is generated from these files:
services/common.proto services/time.proto services/zbs.proto
It has these top-level messages:
IdMessage UuidMessage Timestamp ServerTimeMessage JobArrayMsg JobFilterMsg JobSortingMsg JobMsg JobDataMsg ScriptMsg
Package services is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Package services is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterTimeServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterTimeServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterTimeServiceServer(s *grpc.Server, srv TimeServiceServer)
- func RegisterZbsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterZbsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterZbsServiceServer(s *grpc.Server, srv ZbsServiceServer)
- type IdMessage
- type JobArrayMsg
- type JobDataMsg
- func (*JobDataMsg) Descriptor() ([]byte, []int)
- func (m *JobDataMsg) GetActive() string
- func (m *JobDataMsg) GetExclude() []string
- func (m *JobDataMsg) GetInclude() []string
- func (m *JobDataMsg) GetLocalPostScript() []*ScriptMsg
- func (m *JobDataMsg) GetLocalPreScript() []*ScriptMsg
- func (m *JobDataMsg) GetMountPoint() string
- func (m *JobDataMsg) GetName() string
- func (m *JobDataMsg) GetRemotePostScript() []*ScriptMsg
- func (m *JobDataMsg) GetRemotePreScript() []*ScriptMsg
- func (m *JobDataMsg) GetRsh() string
- func (m *JobDataMsg) GetRsyncOpts() string
- func (m *JobDataMsg) GetRsyncPath() string
- func (m *JobDataMsg) GetServer() string
- func (*JobDataMsg) ProtoMessage()
- func (m *JobDataMsg) Reset()
- func (m *JobDataMsg) String() string
- type JobFilterMsg
- func (*JobFilterMsg) Descriptor() ([]byte, []int)
- func (m *JobFilterMsg) GetActive() int32
- func (m *JobFilterMsg) GetFrom() int64
- func (m *JobFilterMsg) GetLimit() int64
- func (m *JobFilterMsg) GetName() string
- func (m *JobFilterMsg) GetOffset() int64
- func (m *JobFilterMsg) GetSorting() *JobSortingMsg
- func (m *JobFilterMsg) GetTo() int64
- func (*JobFilterMsg) ProtoMessage()
- func (m *JobFilterMsg) Reset()
- func (m *JobFilterMsg) String() string
- type JobMsg
- type JobSortingMsg
- type ScriptMsg
- type ServerTimeMessage
- type TimeServiceClient
- type TimeServiceServer
- type Timestamp
- type UuidMessage
- type ZbsServiceClient
- type ZbsServiceServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterTimeServiceHandler ¶
func RegisterTimeServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterTimeServiceHandler registers the http handlers for service TimeService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterTimeServiceHandlerFromEndpoint ¶
func RegisterTimeServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterTimeServiceHandlerFromEndpoint is same as RegisterTimeServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterTimeServiceServer ¶
func RegisterTimeServiceServer(s *grpc.Server, srv TimeServiceServer)
func RegisterZbsServiceHandler ¶
func RegisterZbsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterZbsServiceHandler registers the http handlers for service ZbsService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterZbsServiceHandlerFromEndpoint ¶
func RegisterZbsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterZbsServiceHandlerFromEndpoint is same as RegisterZbsServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterZbsServiceServer ¶
func RegisterZbsServiceServer(s *grpc.Server, srv ZbsServiceServer)
Types ¶
type IdMessage ¶
type IdMessage struct {
Id int64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
}
func (*IdMessage) Descriptor ¶
func (*IdMessage) ProtoMessage ¶
func (*IdMessage) ProtoMessage()
type JobArrayMsg ¶
type JobArrayMsg struct { Jobs []*JobMsg `protobuf:"bytes,1,rep,name=jobs" json:"jobs,omitempty"` Total int32 `protobuf:"varint,2,opt,name=total" json:"total,omitempty"` }
func (*JobArrayMsg) Descriptor ¶
func (*JobArrayMsg) Descriptor() ([]byte, []int)
func (*JobArrayMsg) GetJobs ¶
func (m *JobArrayMsg) GetJobs() []*JobMsg
func (*JobArrayMsg) GetTotal ¶
func (m *JobArrayMsg) GetTotal() int32
func (*JobArrayMsg) ProtoMessage ¶
func (*JobArrayMsg) ProtoMessage()
func (*JobArrayMsg) Reset ¶
func (m *JobArrayMsg) Reset()
func (*JobArrayMsg) String ¶
func (m *JobArrayMsg) String() string
type JobDataMsg ¶
type JobDataMsg struct { Active string `protobuf:"bytes,1,opt,name=active" json:"active,omitempty"` Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` Server string `protobuf:"bytes,3,opt,name=server" json:"server,omitempty"` MountPoint string `protobuf:"bytes,4,opt,name=mountPoint" json:"mountPoint,omitempty"` LocalPreScript []*ScriptMsg `protobuf:"bytes,5,rep,name=localPreScript" json:"localPreScript,omitempty"` RemotePreScript []*ScriptMsg `protobuf:"bytes,6,rep,name=remotePreScript" json:"remotePreScript,omitempty"` LocalPostScript []*ScriptMsg `protobuf:"bytes,7,rep,name=localPostScript" json:"localPostScript,omitempty"` RemotePostScript []*ScriptMsg `protobuf:"bytes,8,rep,name=remotePostScript" json:"remotePostScript,omitempty"` RsyncPath string `protobuf:"bytes,9,opt,name=rsyncPath" json:"rsyncPath,omitempty"` RsyncOpts string `protobuf:"bytes,10,opt,name=rsyncOpts" json:"rsyncOpts,omitempty"` Rsh string `protobuf:"bytes,11,opt,name=rsh" json:"rsh,omitempty"` Exclude []string `protobuf:"bytes,12,rep,name=exclude" json:"exclude,omitempty"` Include []string `protobuf:"bytes,13,rep,name=include" json:"include,omitempty"` }
func (*JobDataMsg) Descriptor ¶
func (*JobDataMsg) Descriptor() ([]byte, []int)
func (*JobDataMsg) GetActive ¶
func (m *JobDataMsg) GetActive() string
func (*JobDataMsg) GetExclude ¶
func (m *JobDataMsg) GetExclude() []string
func (*JobDataMsg) GetInclude ¶
func (m *JobDataMsg) GetInclude() []string
func (*JobDataMsg) GetLocalPostScript ¶
func (m *JobDataMsg) GetLocalPostScript() []*ScriptMsg
func (*JobDataMsg) GetLocalPreScript ¶
func (m *JobDataMsg) GetLocalPreScript() []*ScriptMsg
func (*JobDataMsg) GetMountPoint ¶
func (m *JobDataMsg) GetMountPoint() string
func (*JobDataMsg) GetName ¶
func (m *JobDataMsg) GetName() string
func (*JobDataMsg) GetRemotePostScript ¶
func (m *JobDataMsg) GetRemotePostScript() []*ScriptMsg
func (*JobDataMsg) GetRemotePreScript ¶
func (m *JobDataMsg) GetRemotePreScript() []*ScriptMsg
func (*JobDataMsg) GetRsh ¶
func (m *JobDataMsg) GetRsh() string
func (*JobDataMsg) GetRsyncOpts ¶
func (m *JobDataMsg) GetRsyncOpts() string
func (*JobDataMsg) GetRsyncPath ¶
func (m *JobDataMsg) GetRsyncPath() string
func (*JobDataMsg) GetServer ¶
func (m *JobDataMsg) GetServer() string
func (*JobDataMsg) ProtoMessage ¶
func (*JobDataMsg) ProtoMessage()
func (*JobDataMsg) Reset ¶
func (m *JobDataMsg) Reset()
func (*JobDataMsg) String ¶
func (m *JobDataMsg) String() string
type JobFilterMsg ¶
type JobFilterMsg struct { Offset int64 `protobuf:"varint,1,opt,name=offset" json:"offset,omitempty"` Limit int64 `protobuf:"varint,2,opt,name=limit" json:"limit,omitempty"` Active int32 `protobuf:"varint,3,opt,name=active" json:"active,omitempty"` Name string `protobuf:"bytes,4,opt,name=name" json:"name,omitempty"` From int64 `protobuf:"varint,5,opt,name=from" json:"from,omitempty"` To int64 `protobuf:"varint,6,opt,name=to" json:"to,omitempty"` Sorting *JobSortingMsg `protobuf:"bytes,7,opt,name=sorting" json:"sorting,omitempty"` }
func (*JobFilterMsg) Descriptor ¶
func (*JobFilterMsg) Descriptor() ([]byte, []int)
func (*JobFilterMsg) GetActive ¶
func (m *JobFilterMsg) GetActive() int32
func (*JobFilterMsg) GetFrom ¶
func (m *JobFilterMsg) GetFrom() int64
func (*JobFilterMsg) GetLimit ¶
func (m *JobFilterMsg) GetLimit() int64
func (*JobFilterMsg) GetName ¶
func (m *JobFilterMsg) GetName() string
func (*JobFilterMsg) GetOffset ¶
func (m *JobFilterMsg) GetOffset() int64
func (*JobFilterMsg) GetSorting ¶
func (m *JobFilterMsg) GetSorting() *JobSortingMsg
func (*JobFilterMsg) GetTo ¶
func (m *JobFilterMsg) GetTo() int64
func (*JobFilterMsg) ProtoMessage ¶
func (*JobFilterMsg) ProtoMessage()
func (*JobFilterMsg) Reset ¶
func (m *JobFilterMsg) Reset()
func (*JobFilterMsg) String ¶
func (m *JobFilterMsg) String() string
type JobMsg ¶
type JobMsg struct { Id int64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"` JobData *JobDataMsg `protobuf:"bytes,2,opt,name=jobData" json:"jobData,omitempty"` }
func (*JobMsg) Descriptor ¶
func (*JobMsg) GetJobData ¶
func (m *JobMsg) GetJobData() *JobDataMsg
func (*JobMsg) ProtoMessage ¶
func (*JobMsg) ProtoMessage()
type JobSortingMsg ¶
type JobSortingMsg struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` Server string `protobuf:"bytes,3,opt,name=server" json:"server,omitempty"` }
Sorting fields, every fields accepts 'DESC' or 'ASC'
func (*JobSortingMsg) Descriptor ¶
func (*JobSortingMsg) Descriptor() ([]byte, []int)
func (*JobSortingMsg) GetId ¶
func (m *JobSortingMsg) GetId() string
func (*JobSortingMsg) GetName ¶
func (m *JobSortingMsg) GetName() string
func (*JobSortingMsg) GetServer ¶
func (m *JobSortingMsg) GetServer() string
func (*JobSortingMsg) ProtoMessage ¶
func (*JobSortingMsg) ProtoMessage()
func (*JobSortingMsg) Reset ¶
func (m *JobSortingMsg) Reset()
func (*JobSortingMsg) String ¶
func (m *JobSortingMsg) String() string
type ScriptMsg ¶
type ScriptMsg struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Lang string `protobuf:"bytes,2,opt,name=lang" json:"lang,omitempty"` Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` }
func (*ScriptMsg) Descriptor ¶
func (*ScriptMsg) ProtoMessage ¶
func (*ScriptMsg) ProtoMessage()
type ServerTimeMessage ¶
type ServerTimeMessage struct {
Value int64 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
}
func (*ServerTimeMessage) Descriptor ¶
func (*ServerTimeMessage) Descriptor() ([]byte, []int)
func (*ServerTimeMessage) GetValue ¶
func (m *ServerTimeMessage) GetValue() int64
func (*ServerTimeMessage) ProtoMessage ¶
func (*ServerTimeMessage) ProtoMessage()
func (*ServerTimeMessage) Reset ¶
func (m *ServerTimeMessage) Reset()
func (*ServerTimeMessage) String ¶
func (m *ServerTimeMessage) String() string
type TimeServiceClient ¶
type TimeServiceClient interface {
GetServerTime(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*ServerTimeMessage, error)
}
func NewTimeServiceClient ¶
func NewTimeServiceClient(cc *grpc.ClientConn) TimeServiceClient
type TimeServiceServer ¶
type TimeServiceServer interface {
GetServerTime(context.Context, *google_protobuf1.Empty) (*ServerTimeMessage, error)
}
type Timestamp ¶
type Timestamp struct { // Representa el tiempo Unix (desde epoch) en UTC Seconds int64 `protobuf:"varint,1,opt,name=seconds" json:"seconds,omitempty"` }
func (*Timestamp) Descriptor ¶
func (*Timestamp) GetSeconds ¶
func (*Timestamp) ProtoMessage ¶
func (*Timestamp) ProtoMessage()
type UuidMessage ¶
type UuidMessage struct {
Uuid string `protobuf:"bytes,1,opt,name=uuid" json:"uuid,omitempty"`
}
func (*UuidMessage) Descriptor ¶
func (*UuidMessage) Descriptor() ([]byte, []int)
func (*UuidMessage) GetUuid ¶
func (m *UuidMessage) GetUuid() string
func (*UuidMessage) ProtoMessage ¶
func (*UuidMessage) ProtoMessage()
func (*UuidMessage) Reset ¶
func (m *UuidMessage) Reset()
func (*UuidMessage) String ¶
func (m *UuidMessage) String() string
type ZbsServiceClient ¶
type ZbsServiceClient interface { FindJob(ctx context.Context, in *IdMessage, opts ...grpc.CallOption) (*JobMsg, error) ListJobs(ctx context.Context, in *JobFilterMsg, opts ...grpc.CallOption) (*JobArrayMsg, error) AddJob(ctx context.Context, in *JobMsg, opts ...grpc.CallOption) (*IdMessage, error) UpdateJob(ctx context.Context, in *JobMsg, opts ...grpc.CallOption) (*JobMsg, error) DeleteJob(ctx context.Context, in *IdMessage, opts ...grpc.CallOption) (*JobMsg, error) }
func NewZbsServiceClient ¶
func NewZbsServiceClient(cc *grpc.ClientConn) ZbsServiceClient
type ZbsServiceServer ¶
type ZbsServiceServer interface { FindJob(context.Context, *IdMessage) (*JobMsg, error) ListJobs(context.Context, *JobFilterMsg) (*JobArrayMsg, error) AddJob(context.Context, *JobMsg) (*IdMessage, error) UpdateJob(context.Context, *JobMsg) (*JobMsg, error) DeleteJob(context.Context, *IdMessage) (*JobMsg, error) }