central_api_gateway/initialize/initialize.pb.go
snoop 2e800a282c changed
enum value
2017-06-06 19:55:55 +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_WAIT AuthStatus_AuthStatusType = 0
AuthStatus_ACCEPT AuthStatus_AuthStatusType = 1
AuthStatus_REFUSE AuthStatus_AuthStatusType = 2
)
var AuthStatus_AuthStatusType_name = map[int32]string{
0: "WAIT",
1: "ACCEPT",
2: "REFUSE",
}
var AuthStatus_AuthStatusType_value = map[string]int32{
"WAIT": 0,
"ACCEPT": 1,
"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_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{
// 354 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x92, 0x61, 0x4b, 0xfa, 0x50,
0x14, 0xc6, 0x37, 0xf5, 0xaf, 0xee, 0xe8, 0x7f, 0x8d, 0x4b, 0xc4, 0x18, 0x41, 0x72, 0x29, 0x30,
0x88, 0x41, 0xf6, 0x09, 0x86, 0x18, 0x0c, 0x21, 0x62, 0x2e, 0x7a, 0x17, 0xdc, 0xec, 0x94, 0xa3,
0xb9, 0x5d, 0xb7, 0x33, 0x61, 0x7d, 0x8b, 0xbe,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