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 ¶
- func RegisterContactServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterContactServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterContactServiceServer(s *grpc.Server, srv ContactServiceServer)
- func RegisterMirrorServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterMirrorServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterMirrorServiceServer(s *grpc.Server, srv MirrorServiceServer)
- func RegisterServiceServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterServiceServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterServiceServiceServer(s *grpc.Server, srv ServiceServiceServer)
- type AuthorizeContactRequest
- func (*AuthorizeContactRequest) Descriptor() ([]byte, []int)
- func (m *AuthorizeContactRequest) GetEmail() string
- func (m *AuthorizeContactRequest) GetPassword() string
- func (*AuthorizeContactRequest) ProtoMessage()
- func (m *AuthorizeContactRequest) Reset()
- func (m *AuthorizeContactRequest) String() string
- type ConnectServiceAndMirror
- func (*ConnectServiceAndMirror) Descriptor() ([]byte, []int)
- func (m *ConnectServiceAndMirror) GetEndpointId() int32
- func (m *ConnectServiceAndMirror) GetMirrorId() int32
- func (*ConnectServiceAndMirror) ProtoMessage()
- func (m *ConnectServiceAndMirror) Reset()
- func (m *ConnectServiceAndMirror) String() string
- type Contact
- func (*Contact) Descriptor() ([]byte, []int)
- func (m *Contact) GetAdmin() bool
- func (m *Contact) GetEmail() string
- func (m *Contact) GetId() int32
- func (m *Contact) GetMirrors() []*Mirror
- func (m *Contact) GetName() string
- func (m *Contact) GetPassword() string
- func (*Contact) ProtoMessage()
- func (m *Contact) Reset()
- func (m *Contact) String() string
- type ContactResponse
- type ContactServiceClient
- type ContactServiceServer
- type ListRequest
- type Mirror
- func (*Mirror) Descriptor() ([]byte, []int)
- func (m *Mirror) GetAvailableStorage() int64
- func (m *Mirror) GetBandwidth() int64
- func (m *Mirror) GetClientToken() string
- func (m *Mirror) GetContactId() int32
- func (m *Mirror) GetCreatedAt() int64
- func (m *Mirror) GetDomain() string
- func (m *Mirror) GetId() int32
- func (m *Mirror) GetIpv4() string
- func (m *Mirror) GetIpv6() string
- func (m *Mirror) GetLocalDestination() string
- func (m *Mirror) GetName() string
- func (m *Mirror) GetService() *Service
- func (m *Mirror) GetServiceEndpoint() *Mirror
- func (m *Mirror) GetStorage() int64
- func (m *Mirror) GetTraffic() int64
- func (*Mirror) ProtoMessage()
- func (m *Mirror) Reset()
- func (m *Mirror) String() string
- type MirrorFindRequest
- type MirrorGetResponse
- type MirrorServiceClient
- type MirrorServiceServer
- type Service
- type ServiceGetRequest
- type ServiceGetResponse
- type ServiceServiceClient
- type ServiceServiceServer
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) GetMirrors ¶ added in v0.1.3
func (*Contact) GetPassword ¶
func (*Contact) ProtoMessage ¶
func (*Contact) ProtoMessage()
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 ContactServiceServer ¶
type ContactServiceServer interface { Create(context.Context, *Contact) (*ContactResponse, error) Update(context.Context, *Contact) (*ContactResponse, error) Get(context.Context, *Contact) (*ContactResponse, error) Authorize(context.Context, *AuthorizeContactRequest) (*ContactResponse, error) }
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) GetAvailableStorage ¶
func (*Mirror) GetBandwidth ¶
func (*Mirror) GetClientToken ¶
func (*Mirror) GetContactId ¶
func (*Mirror) GetCreatedAt ¶
func (*Mirror) GetLocalDestination ¶
func (*Mirror) GetService ¶
func (*Mirror) GetServiceEndpoint ¶
func (*Mirror) GetStorage ¶ added in v0.1.3
func (*Mirror) GetTraffic ¶
func (*Mirror) ProtoMessage ¶
func (*Mirror) ProtoMessage()
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 MirrorServiceServer ¶
type MirrorServiceServer interface { Get(context.Context, *ListRequest) (*MirrorGetResponse, error) Find(context.Context, *MirrorFindRequest) (*Mirror, error) FindById(context.Context, *Mirror) (*Mirror, error) UpdateById(context.Context, *Mirror) (*Mirror, error) Connect(context.Context, *ConnectServiceAndMirror) (*Mirror, error) Create(context.Context, *Mirror) (*Mirror, error) }
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) GetStorage ¶
func (*Service) ProtoMessage ¶
func (*Service) ProtoMessage()
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