proto

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2017 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package proto is a generated protocol buffer package.

It is generated from these files:

controllers/proto/api.proto

It has these top-level messages:

ContactResponse
AuthorizeContactRequest
ConnectServiceAndMirror
MirrorFindRequest
ListRequest
MirrorGetResponse
ServiceGetRequest
ServiceGetResponse
Contact
Service
Mirror

Package proto is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterContactServiceHandler

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

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

func RegisterContactServiceHandlerFromEndpoint

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

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

func RegisterContactServiceServer

func RegisterContactServiceServer(s *grpc.Server, srv ContactServiceServer)

func RegisterMirrorServiceHandler

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

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

func RegisterMirrorServiceHandlerFromEndpoint

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

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

func RegisterMirrorServiceServer

func RegisterMirrorServiceServer(s *grpc.Server, srv MirrorServiceServer)

func RegisterServiceServiceHandler

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

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

func RegisterServiceServiceHandlerFromEndpoint

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

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

func RegisterServiceServiceServer

func RegisterServiceServiceServer(s *grpc.Server, srv ServiceServiceServer)

Types

type AuthorizeContactRequest

type AuthorizeContactRequest struct {
	Email    string `protobuf:"bytes,1,opt,name=email" json:"email,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password" json:"password,omitempty"`
}

func (*AuthorizeContactRequest) Descriptor

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

func (*AuthorizeContactRequest) GetEmail

func (m *AuthorizeContactRequest) GetEmail() string

func (*AuthorizeContactRequest) GetPassword

func (m *AuthorizeContactRequest) GetPassword() string

func (*AuthorizeContactRequest) ProtoMessage

func (*AuthorizeContactRequest) ProtoMessage()

func (*AuthorizeContactRequest) Reset

func (m *AuthorizeContactRequest) Reset()

func (*AuthorizeContactRequest) String

func (m *AuthorizeContactRequest) String() string

type ConnectServiceAndMirror added in v0.1.3

type ConnectServiceAndMirror struct {
	MirrorId   int32 `protobuf:"varint,1,opt,name=mirror_id,json=mirrorId" json:"mirror_id,omitempty"`
	EndpointId int32 `protobuf:"varint,2,opt,name=endpoint_id,json=endpointId" json:"endpoint_id,omitempty"`
}

func (*ConnectServiceAndMirror) Descriptor added in v0.1.3

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

func (*ConnectServiceAndMirror) GetEndpointId added in v0.1.3

func (m *ConnectServiceAndMirror) GetEndpointId() int32

func (*ConnectServiceAndMirror) GetMirrorId added in v0.1.3

func (m *ConnectServiceAndMirror) GetMirrorId() int32

func (*ConnectServiceAndMirror) ProtoMessage added in v0.1.3

func (*ConnectServiceAndMirror) ProtoMessage()

func (*ConnectServiceAndMirror) Reset added in v0.1.3

func (m *ConnectServiceAndMirror) Reset()

func (*ConnectServiceAndMirror) String added in v0.1.3

func (m *ConnectServiceAndMirror) String() string

type Contact

type Contact struct {
	Id       int32     `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	Name     string    `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
	Email    string    `protobuf:"bytes,3,opt,name=email" json:"email,omitempty"`
	Password string    `protobuf:"bytes,4,opt,name=password" json:"password,omitempty"`
	Admin    bool      `protobuf:"varint,5,opt,name=admin" json:"admin,omitempty"`
	Mirrors  []*Mirror `protobuf:"bytes,6,rep,name=mirrors" json:"mirrors,omitempty"`
}

func (*Contact) Descriptor

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

func (*Contact) GetAdmin

func (m *Contact) GetAdmin() bool

func (*Contact) GetEmail

func (m *Contact) GetEmail() string

func (*Contact) GetId

func (m *Contact) GetId() int32

func (*Contact) GetMirrors added in v0.1.3

func (m *Contact) GetMirrors() []*Mirror

func (*Contact) GetName

func (m *Contact) GetName() string

func (*Contact) GetPassword

func (m *Contact) GetPassword() string

func (*Contact) ProtoMessage

func (*Contact) ProtoMessage()

func (*Contact) Reset

func (m *Contact) Reset()

func (*Contact) String

func (m *Contact) String() string

type ContactResponse added in v0.1.2

type ContactResponse struct {
	Token   string   `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"`
	Contact *Contact `protobuf:"bytes,2,opt,name=contact" json:"contact,omitempty"`
}

func (*ContactResponse) Descriptor added in v0.1.2

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

func (*ContactResponse) GetContact added in v0.1.2

func (m *ContactResponse) GetContact() *Contact

func (*ContactResponse) GetToken added in v0.1.2

func (m *ContactResponse) GetToken() string

func (*ContactResponse) ProtoMessage added in v0.1.2

func (*ContactResponse) ProtoMessage()

func (*ContactResponse) Reset added in v0.1.2

func (m *ContactResponse) Reset()

func (*ContactResponse) String added in v0.1.2

func (m *ContactResponse) String() string

type ContactServiceClient

type ContactServiceClient interface {
	Create(ctx context.Context, in *Contact, opts ...grpc.CallOption) (*ContactResponse, error)
	Update(ctx context.Context, in *Contact, opts ...grpc.CallOption) (*ContactResponse, error)
	Get(ctx context.Context, in *Contact, opts ...grpc.CallOption) (*ContactResponse, error)
	Authorize(ctx context.Context, in *AuthorizeContactRequest, opts ...grpc.CallOption) (*ContactResponse, error)
}

func NewContactServiceClient

func NewContactServiceClient(cc *grpc.ClientConn) ContactServiceClient

type ListRequest added in v0.1.3

type ListRequest struct {
	Limit  int32 `protobuf:"varint,1,opt,name=limit" json:"limit,omitempty"`
	Offset int32 `protobuf:"varint,2,opt,name=offset" json:"offset,omitempty"`
}

func (*ListRequest) Descriptor added in v0.1.3

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

func (*ListRequest) GetLimit added in v0.1.3

func (m *ListRequest) GetLimit() int32

func (*ListRequest) GetOffset added in v0.1.3

func (m *ListRequest) GetOffset() int32

func (*ListRequest) ProtoMessage added in v0.1.3

func (*ListRequest) ProtoMessage()

func (*ListRequest) Reset added in v0.1.3

func (m *ListRequest) Reset()

func (*ListRequest) String added in v0.1.3

func (m *ListRequest) String() string

type Mirror

type Mirror struct {
	Id               int32    `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	ContactId        int32    `protobuf:"varint,2,opt,name=contact_id,json=contactId" json:"contact_id,omitempty"`
	Ipv4             string   `protobuf:"bytes,3,opt,name=ipv4" json:"ipv4,omitempty"`
	Ipv6             string   `protobuf:"bytes,4,opt,name=ipv6" json:"ipv6,omitempty"`
	Name             string   `protobuf:"bytes,5,opt,name=name" json:"name,omitempty"`
	Domain           string   `protobuf:"bytes,6,opt,name=domain" json:"domain,omitempty"`
	ClientToken      string   `protobuf:"bytes,7,opt,name=client_token,json=clientToken" json:"client_token,omitempty"`
	CreatedAt        int64    `protobuf:"varint,8,opt,name=created_at,json=createdAt" json:"created_at,omitempty"`
	Bandwidth        int64    `protobuf:"varint,9,opt,name=bandwidth" json:"bandwidth,omitempty"`
	Traffic          int64    `protobuf:"varint,10,opt,name=traffic" json:"traffic,omitempty"`
	AvailableStorage int64    `protobuf:"varint,11,opt,name=available_storage,json=availableStorage" json:"available_storage,omitempty"`
	Service          *Service `protobuf:"bytes,12,opt,name=service" json:"service,omitempty"`
	ServiceEndpoint  *Mirror  `protobuf:"bytes,13,opt,name=service_endpoint,json=serviceEndpoint" json:"service_endpoint,omitempty"`
	LocalDestination string   `protobuf:"bytes,14,opt,name=local_destination,json=localDestination" json:"local_destination,omitempty"`
	Storage          int64    `protobuf:"varint,15,opt,name=storage" json:"storage,omitempty"`
}

func (*Mirror) Descriptor

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

func (*Mirror) GetAvailableStorage

func (m *Mirror) GetAvailableStorage() int64

func (*Mirror) GetBandwidth

func (m *Mirror) GetBandwidth() int64

func (*Mirror) GetClientToken

func (m *Mirror) GetClientToken() string

func (*Mirror) GetContactId

func (m *Mirror) GetContactId() int32

func (*Mirror) GetCreatedAt

func (m *Mirror) GetCreatedAt() int64

func (*Mirror) GetDomain

func (m *Mirror) GetDomain() string

func (*Mirror) GetId

func (m *Mirror) GetId() int32

func (*Mirror) GetIpv4

func (m *Mirror) GetIpv4() string

func (*Mirror) GetIpv6

func (m *Mirror) GetIpv6() string

func (*Mirror) GetLocalDestination

func (m *Mirror) GetLocalDestination() string

func (*Mirror) GetName

func (m *Mirror) GetName() string

func (*Mirror) GetService

func (m *Mirror) GetService() *Service

func (*Mirror) GetServiceEndpoint

func (m *Mirror) GetServiceEndpoint() *Mirror

func (*Mirror) GetStorage added in v0.1.3

func (m *Mirror) GetStorage() int64

func (*Mirror) GetTraffic

func (m *Mirror) GetTraffic() int64

func (*Mirror) ProtoMessage

func (*Mirror) ProtoMessage()

func (*Mirror) Reset

func (m *Mirror) Reset()

func (*Mirror) String

func (m *Mirror) String() string

type MirrorFindRequest

type MirrorFindRequest struct {
	ClientToken string `protobuf:"bytes,1,opt,name=client_token,json=clientToken" json:"client_token,omitempty"`
}

func (*MirrorFindRequest) Descriptor

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

func (*MirrorFindRequest) GetClientToken

func (m *MirrorFindRequest) GetClientToken() string

func (*MirrorFindRequest) ProtoMessage

func (*MirrorFindRequest) ProtoMessage()

func (*MirrorFindRequest) Reset

func (m *MirrorFindRequest) Reset()

func (*MirrorFindRequest) String

func (m *MirrorFindRequest) String() string

type MirrorGetResponse

type MirrorGetResponse struct {
	Mirrors []*Mirror `protobuf:"bytes,1,rep,name=mirrors" json:"mirrors,omitempty"`
}

func (*MirrorGetResponse) Descriptor

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

func (*MirrorGetResponse) GetMirrors

func (m *MirrorGetResponse) GetMirrors() []*Mirror

func (*MirrorGetResponse) ProtoMessage

func (*MirrorGetResponse) ProtoMessage()

func (*MirrorGetResponse) Reset

func (m *MirrorGetResponse) Reset()

func (*MirrorGetResponse) String

func (m *MirrorGetResponse) String() string

type MirrorServiceClient

type MirrorServiceClient interface {
	Get(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*MirrorGetResponse, error)
	Find(ctx context.Context, in *MirrorFindRequest, opts ...grpc.CallOption) (*Mirror, error)
	FindById(ctx context.Context, in *Mirror, opts ...grpc.CallOption) (*Mirror, error)
	UpdateById(ctx context.Context, in *Mirror, opts ...grpc.CallOption) (*Mirror, error)
	Connect(ctx context.Context, in *ConnectServiceAndMirror, opts ...grpc.CallOption) (*Mirror, error)
	Create(ctx context.Context, in *Mirror, opts ...grpc.CallOption) (*Mirror, error)
}

func NewMirrorServiceClient

func NewMirrorServiceClient(cc *grpc.ClientConn) MirrorServiceClient

type Service

type Service struct {
	Id      int32    `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	Name    string   `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
	Storage int64    `protobuf:"varint,3,opt,name=storage" json:"storage,omitempty"`
	Files   []string `protobuf:"bytes,4,rep,name=files" json:"files,omitempty"`
}

func (*Service) Descriptor

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

func (*Service) GetFiles added in v0.2.0

func (m *Service) GetFiles() []string

func (*Service) GetId

func (m *Service) GetId() int32

func (*Service) GetName

func (m *Service) GetName() string

func (*Service) GetStorage

func (m *Service) GetStorage() int64

func (*Service) ProtoMessage

func (*Service) ProtoMessage()

func (*Service) Reset

func (m *Service) Reset()

func (*Service) String

func (m *Service) String() string

type ServiceGetRequest

type ServiceGetRequest struct {
	Limit  int32 `protobuf:"varint,1,opt,name=limit" json:"limit,omitempty"`
	Offset int32 `protobuf:"varint,2,opt,name=offset" json:"offset,omitempty"`
}

func (*ServiceGetRequest) Descriptor

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

func (*ServiceGetRequest) GetLimit

func (m *ServiceGetRequest) GetLimit() int32

func (*ServiceGetRequest) GetOffset

func (m *ServiceGetRequest) GetOffset() int32

func (*ServiceGetRequest) ProtoMessage

func (*ServiceGetRequest) ProtoMessage()

func (*ServiceGetRequest) Reset

func (m *ServiceGetRequest) Reset()

func (*ServiceGetRequest) String

func (m *ServiceGetRequest) String() string

type ServiceGetResponse

type ServiceGetResponse struct {
	Services []*Service `protobuf:"bytes,1,rep,name=services" json:"services,omitempty"`
}

func (*ServiceGetResponse) Descriptor

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

func (*ServiceGetResponse) GetServices

func (m *ServiceGetResponse) GetServices() []*Service

func (*ServiceGetResponse) ProtoMessage

func (*ServiceGetResponse) ProtoMessage()

func (*ServiceGetResponse) Reset

func (m *ServiceGetResponse) Reset()

func (*ServiceGetResponse) String

func (m *ServiceGetResponse) String() string

type ServiceServiceClient

type ServiceServiceClient interface {
	Get(ctx context.Context, in *ServiceGetRequest, opts ...grpc.CallOption) (*ServiceGetResponse, error)
	Update(ctx context.Context, in *Service, opts ...grpc.CallOption) (*Service, error)
	Find(ctx context.Context, in *Service, opts ...grpc.CallOption) (*Service, error)
	Create(ctx context.Context, in *Service, opts ...grpc.CallOption) (*Service, error)
}

func NewServiceServiceClient

func NewServiceServiceClient(cc *grpc.ClientConn) ServiceServiceClient

type ServiceServiceServer

type ServiceServiceServer interface {
	Get(context.Context, *ServiceGetRequest) (*ServiceGetResponse, error)
	Update(context.Context, *Service) (*Service, error)
	Find(context.Context, *Service) (*Service, error)
	Create(context.Context, *Service) (*Service, error)
}

Jump to

Keyboard shortcuts

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