central_api_gateway/initialize/initialize.pb.go
snoop 94672567e0 updated
initialize
2017-06-06 16:36:07 +09:00

360 lines
12 KiB
Go

// Code generated by protoc-gen-go. DO NOT EDIT.
// source: initialize.proto
/*
Package initialize is a generated protocol buffer package.
It is generated from these files:
initialize.proto
It has these top-level messages:
AgentInfo
InitResponse
ReqTempKeyInfo
TempKeyInfo
TempKey
AuthStatus
*/
package initialize
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type AuthStatus_AuthStatusType int32
const (
AuthStatus_AUTH_WAIT AuthStatus_AuthStatusType = 0
AuthStatus_AUTH_ACCEPT AuthStatus_AuthStatusType = 1
AuthStatus_AUTH_REFUSE AuthStatus_AuthStatusType = 2
)
var AuthStatus_AuthStatusType_name = map[int32]string{
0: "AUTH_WAIT",
1: "AUTH_ACCEPT",
2: "AUTH_REFUSE",
}
var AuthStatus_AuthStatusType_value = map[string]int32{
"AUTH_WAIT": 0,
"AUTH_ACCEPT": 1,
"AUTH_REFUSE": 2,
}
func (x AuthStatus_AuthStatusType) String() string {
return proto.EnumName(AuthStatus_AuthStatusType_name, int32(x))
}
func (AuthStatus_AuthStatusType) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{5, 0} }
type AgentInfo struct {
AgentId string `protobuf:"bytes,1,opt,name=agentId" json:"agentId,omitempty"`
}
func (m *AgentInfo) Reset() { *m = AgentInfo{} }
func (m *AgentInfo) String() string { return proto.CompactTextString(m) }
func (*AgentInfo) ProtoMessage() {}
func (*AgentInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *AgentInfo) GetAgentId() string {
if m != nil {
return m.AgentId
}
return ""
}
type InitResponse struct {
SecretKey string `protobuf:"bytes,1,opt,name=secretKey" json:"secretKey,omitempty"`
}
func (m *InitResponse) Reset() { *m = InitResponse{} }
func (m *InitResponse) String() string { return proto.CompactTextString(m) }
func (*InitResponse) ProtoMessage() {}
func (*InitResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *InitResponse) GetSecretKey() string {
if m != nil {
return m.SecretKey
}
return ""
}
type ReqTempKeyInfo struct {
ApiKey string `protobuf:"bytes,1,opt,name=apiKey" json:"apiKey,omitempty"`
LocalIp int64 `protobuf:"varint,2,opt,name=localIp" json:"localIp,omitempty"`
HostName string `protobuf:"bytes,3,opt,name=hostName" json:"hostName,omitempty"`
}
func (m *ReqTempKeyInfo) Reset() { *m = ReqTempKeyInfo{} }
func (m *ReqTempKeyInfo) String() string { return proto.CompactTextString(m) }
func (*ReqTempKeyInfo) ProtoMessage() {}
func (*ReqTempKeyInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *ReqTempKeyInfo) GetApiKey() string {
if m != nil {
return m.ApiKey
}
return ""
}
func (m *ReqTempKeyInfo) GetLocalIp() int64 {
if m != nil {
return m.LocalIp
}
return 0
}
func (m *ReqTempKeyInfo) GetHostName() string {
if m != nil {
return m.HostName
}
return ""
}
type TempKeyInfo struct {
TempKey string `protobuf:"bytes,1,opt,name=tempKey" json:"tempKey,omitempty"`
PollInterval float64 `protobuf:"fixed64,2,opt,name=pollInterval" json:"pollInterval,omitempty"`
}
func (m *TempKeyInfo) Reset() { *m = TempKeyInfo{} }
func (m *TempKeyInfo) String() string { return proto.CompactTextString(m) }
func (*TempKeyInfo) ProtoMessage() {}
func (*TempKeyInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (m *TempKeyInfo) GetTempKey() string {
if m != nil {
return m.TempKey
}
return ""
}
func (m *TempKeyInfo) GetPollInterval() float64 {
if m != nil {
return m.PollInterval
}
return 0
}
type TempKey struct {
Value string `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"`
}
func (m *TempKey) Reset() { *m = TempKey{} }
func (m *TempKey) String() string { return proto.CompactTextString(m) }
func (*TempKey) ProtoMessage() {}
func (*TempKey) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
func (m *TempKey) GetValue() string {
if m != nil {
return m.Value
}
return ""
}
type AuthStatus struct {
Type AuthStatus_AuthStatusType `protobuf:"varint,1,opt,name=type,enum=AuthStatus_AuthStatusType" json:"type,omitempty"`
}
func (m *AuthStatus) Reset() { *m = AuthStatus{} }
func (m *AuthStatus) String() string { return proto.CompactTextString(m) }
func (*AuthStatus) ProtoMessage() {}
func (*AuthStatus) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
func (m *AuthStatus) GetType() AuthStatus_AuthStatusType {
if m != nil {
return m.Type
}
return AuthStatus_AUTH_WAIT
}
func init() {
proto.RegisterType((*AgentInfo)(nil), "AgentInfo")
proto.RegisterType((*InitResponse)(nil), "InitResponse")
proto.RegisterType((*ReqTempKeyInfo)(nil), "ReqTempKeyInfo")
proto.RegisterType((*TempKeyInfo)(nil), "TempKeyInfo")
proto.RegisterType((*TempKey)(nil), "TempKey")
proto.RegisterType((*AuthStatus)(nil), "AuthStatus")
proto.RegisterEnum("AuthStatus_AuthStatusType", AuthStatus_AuthStatusType_name, AuthStatus_AuthStatusType_value)
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// Client API for Initializer service
type InitializerClient interface {
StartAgent(ctx context.Context, in *AgentInfo, opts ...grpc.CallOption) (*InitResponse, error)
RequestTempKey(ctx context.Context, in *ReqTempKeyInfo, opts ...grpc.CallOption) (*TempKeyInfo, error)
CheckAuth(ctx context.Context, in *TempKey, opts ...grpc.CallOption) (*AuthStatus, error)
}
type initializerClient struct {
cc *grpc.ClientConn
}
func NewInitializerClient(cc *grpc.ClientConn) InitializerClient {
return &initializerClient{cc}
}
func (c *initializerClient) StartAgent(ctx context.Context, in *AgentInfo, opts ...grpc.CallOption) (*InitResponse, error) {
out := new(InitResponse)
err := grpc.Invoke(ctx, "/Initializer/startAgent", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *initializerClient) RequestTempKey(ctx context.Context, in *ReqTempKeyInfo, opts ...grpc.CallOption) (*TempKeyInfo, error) {
out := new(TempKeyInfo)
err := grpc.Invoke(ctx, "/Initializer/requestTempKey", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *initializerClient) CheckAuth(ctx context.Context, in *TempKey, opts ...grpc.CallOption) (*AuthStatus, error) {
out := new(AuthStatus)
err := grpc.Invoke(ctx, "/Initializer/CheckAuth", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for Initializer service
type InitializerServer interface {
StartAgent(context.Context, *AgentInfo) (*InitResponse, error)
RequestTempKey(context.Context, *ReqTempKeyInfo) (*TempKeyInfo, error)
CheckAuth(context.Context, *TempKey) (*AuthStatus, error)
}
func RegisterInitializerServer(s *grpc.Server, srv InitializerServer) {
s.RegisterService(&_Initializer_serviceDesc, srv)
}
func _Initializer_StartAgent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AgentInfo)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(InitializerServer).StartAgent(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/Initializer/StartAgent",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(InitializerServer).StartAgent(ctx, req.(*AgentInfo))
}
return interceptor(ctx, in, info, handler)
}
func _Initializer_RequestTempKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ReqTempKeyInfo)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(InitializerServer).RequestTempKey(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/Initializer/RequestTempKey",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(InitializerServer).RequestTempKey(ctx, req.(*ReqTempKeyInfo))
}
return interceptor(ctx, in, info, handler)
}
func _Initializer_CheckAuth_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(TempKey)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(InitializerServer).CheckAuth(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/Initializer/CheckAuth",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(InitializerServer).CheckAuth(ctx, req.(*TempKey))
}
return interceptor(ctx, in, info, handler)
}
var _Initializer_serviceDesc = grpc.ServiceDesc{
ServiceName: "Initializer",
HandlerType: (*InitializerServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "startAgent",
Handler: _Initializer_StartAgent_Handler,
},
{
MethodName: "requestTempKey",
Handler: _Initializer_RequestTempKey_Handler,
},
{
MethodName: "CheckAuth",
Handler: _Initializer_CheckAuth_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "initialize.proto",
}
func init() { proto.RegisterFile("initialize.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 363 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x92, 0xe1, 0x6a, 0xa3, 0x40,
0x14, 0x85, 0x35, 0xd9, 0x4d, 0xe2, 0x35, 0x31, 0x32, 0x2c, 0x8b, 0x48, 0xa1, 0x61, 0x68, 0x21,
0x85, 0x22, 0x34, 0x7d, 0x02, 0x09, 0x29, 0x95, 0x40, 0x29, 0xc6, 0xd0, 0x7f, 0x2d, 0xd3, 0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