api

package
v0.0.0-...-0704e8f Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2018 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package api is a generated protocol buffer package.

It is generated from these files:

api/api.proto

It has these top-level messages:

Service
Project
Response

Package api is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterProjectServiceHandler

func RegisterProjectServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterProjectServiceHandler registers the http handlers for service ProjectService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterProjectServiceHandlerFromEndpoint

func RegisterProjectServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterProjectServiceHandlerFromEndpoint is same as RegisterProjectServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterProjectServiceServer

func RegisterProjectServiceServer(s *grpc.Server, srv ProjectServiceServer)

Types

type Project

type Project struct {
	Name     string              `protobuf:"bytes,1,opt,name=Name" json:"Name,omitempty"`
	Version  string              `protobuf:"bytes,2,opt,name=Version" json:"Version,omitempty"`
	Services map[string]*Service `` /* 136-byte string literal not displayed */
}

func (*Project) Descriptor

func (*Project) Descriptor() ([]byte, []int)

func (*Project) GetName

func (m *Project) GetName() string

func (*Project) GetServices

func (m *Project) GetServices() map[string]*Service

func (*Project) GetVersion

func (m *Project) GetVersion() string

func (*Project) ProtoMessage

func (*Project) ProtoMessage()

func (*Project) Reset

func (m *Project) Reset()

func (*Project) String

func (m *Project) String() string

type ProjectServiceClient

type ProjectServiceClient interface {
	Start(ctx context.Context, in *Project, opts ...grpc.CallOption) (*Response, error)
	Status(ctx context.Context, in *Project, opts ...grpc.CallOption) (*Response, error)
	Stop(ctx context.Context, in *Project, opts ...grpc.CallOption) (*Response, error)
}

func NewProjectServiceClient

func NewProjectServiceClient(cc *grpc.ClientConn) ProjectServiceClient

type ProjectServiceServer

type ProjectServiceServer interface {
	Start(context.Context, *Project) (*Response, error)
	Status(context.Context, *Project) (*Response, error)
	Stop(context.Context, *Project) (*Response, error)
}

func NewProjectService

func NewProjectService() ProjectServiceServer

NewProjectService create a new project handler server

type Response

type Response struct {
	Code    int32  `protobuf:"varint,1,opt,name=code" json:"code,omitempty"`
	Message string `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"`
}

func (*Response) Descriptor

func (*Response) Descriptor() ([]byte, []int)

func (*Response) GetCode

func (m *Response) GetCode() int32

func (*Response) GetMessage

func (m *Response) GetMessage() string

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) Reset

func (m *Response) Reset()

func (*Response) String

func (m *Response) String() string

type Service

type Service struct {
	Name string            `protobuf:"bytes,1,opt,name=Name" json:"Name,omitempty"`
	Tags map[string]string `` /* 128-byte string literal not displayed */
	File []byte            `protobuf:"bytes,3,opt,name=File,proto3" json:"File,omitempty"`
	Mode string            `protobuf:"bytes,4,opt,name=Mode" json:"Mode,omitempty"`
}

func (*Service) Descriptor

func (*Service) Descriptor() ([]byte, []int)

func (*Service) GetFile

func (m *Service) GetFile() []byte

func (*Service) GetMode

func (m *Service) GetMode() string

func (*Service) GetName

func (m *Service) GetName() string

func (*Service) GetTags

func (m *Service) GetTags() map[string]string

func (*Service) ProtoMessage

func (*Service) ProtoMessage()

func (*Service) Reset

func (m *Service) Reset()

func (*Service) String

func (m *Service) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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