services

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2017 License: BSD-3-Clause Imports: 13 Imported by: 0

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

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) Descriptor() ([]byte, []int)

func (*IdMessage) GetId

func (m *IdMessage) GetId() int64

func (*IdMessage) ProtoMessage

func (*IdMessage) ProtoMessage()

func (*IdMessage) Reset

func (m *IdMessage) Reset()

func (*IdMessage) String

func (m *IdMessage) String() string

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) Descriptor() ([]byte, []int)

func (*JobMsg) GetId

func (m *JobMsg) GetId() int64

func (*JobMsg) GetJobData

func (m *JobMsg) GetJobData() *JobDataMsg

func (*JobMsg) ProtoMessage

func (*JobMsg) ProtoMessage()

func (*JobMsg) Reset

func (m *JobMsg) Reset()

func (*JobMsg) String

func (m *JobMsg) String() string

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) Descriptor() ([]byte, []int)

func (*ScriptMsg) GetData

func (m *ScriptMsg) GetData() []byte

func (*ScriptMsg) GetLang

func (m *ScriptMsg) GetLang() string

func (*ScriptMsg) GetName

func (m *ScriptMsg) GetName() string

func (*ScriptMsg) ProtoMessage

func (*ScriptMsg) ProtoMessage()

func (*ScriptMsg) Reset

func (m *ScriptMsg) Reset()

func (*ScriptMsg) String

func (m *ScriptMsg) String() string

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) Descriptor() ([]byte, []int)

func (*Timestamp) GetSeconds

func (m *Timestamp) GetSeconds() int64

func (*Timestamp) ProtoMessage

func (*Timestamp) ProtoMessage()

func (*Timestamp) Reset

func (m *Timestamp) Reset()

func (*Timestamp) String

func (m *Timestamp) String() string

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)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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