github.com/leonlxy/hyperledger@v1.0.0-alpha.0.20170427033203-34922035d248/protos/peer/admin.pb.go (about)

     1  // Code generated by protoc-gen-go.
     2  // source: peer/admin.proto
     3  // DO NOT EDIT!
     4  
     5  /*
     6  Package peer is a generated protocol buffer package.
     7  
     8  It is generated from these files:
     9  	peer/admin.proto
    10  	peer/chaincode.proto
    11  	peer/chaincode_event.proto
    12  	peer/chaincode_shim.proto
    13  	peer/configuration.proto
    14  	peer/events.proto
    15  	peer/peer.proto
    16  	peer/proposal.proto
    17  	peer/proposal_response.proto
    18  	peer/query.proto
    19  	peer/signed_cc_dep_spec.proto
    20  	peer/transaction.proto
    21  
    22  It has these top-level messages:
    23  	ServerStatus
    24  	LogLevelRequest
    25  	LogLevelResponse
    26  	ChaincodeID
    27  	ChaincodeInput
    28  	ChaincodeSpec
    29  	ChaincodeDeploymentSpec
    30  	ChaincodeInvocationSpec
    31  	ChaincodeEvent
    32  	ChaincodeMessage
    33  	PutStateInfo
    34  	GetStateByRange
    35  	GetQueryResult
    36  	GetHistoryForKey
    37  	QueryStateNext
    38  	QueryStateClose
    39  	QueryResultBytes
    40  	QueryResponse
    41  	AnchorPeers
    42  	AnchorPeer
    43  	ChaincodeReg
    44  	Interest
    45  	Register
    46  	Rejection
    47  	Unregister
    48  	SignedEvent
    49  	Event
    50  	PeerID
    51  	PeerEndpoint
    52  	SignedProposal
    53  	Proposal
    54  	ChaincodeHeaderExtension
    55  	ChaincodeProposalPayload
    56  	ChaincodeAction
    57  	ProposalResponse
    58  	Response
    59  	ProposalResponsePayload
    60  	Endorsement
    61  	ChaincodeQueryResponse
    62  	ChaincodeInfo
    63  	ChannelQueryResponse
    64  	ChannelInfo
    65  	SignedChaincodeDeploymentSpec
    66  	SignedTransaction
    67  	ProcessedTransaction
    68  	Transaction
    69  	TransactionAction
    70  	ChaincodeActionPayload
    71  	ChaincodeEndorsedAction
    72  */
    73  package peer
    74  
    75  import proto "github.com/golang/protobuf/proto"
    76  import fmt "fmt"
    77  import math "math"
    78  import google_protobuf "github.com/golang/protobuf/ptypes/empty"
    79  
    80  import (
    81  	context "golang.org/x/net/context"
    82  	grpc "google.golang.org/grpc"
    83  )
    84  
    85  // Reference imports to suppress errors if they are not otherwise used.
    86  var _ = proto.Marshal
    87  var _ = fmt.Errorf
    88  var _ = math.Inf
    89  
    90  // This is a compile-time assertion to ensure that this generated file
    91  // is compatible with the proto package it is being compiled against.
    92  // A compilation error at this line likely means your copy of the
    93  // proto package needs to be updated.
    94  const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
    95  
    96  type ServerStatus_StatusCode int32
    97  
    98  const (
    99  	ServerStatus_UNDEFINED ServerStatus_StatusCode = 0
   100  	ServerStatus_STARTED   ServerStatus_StatusCode = 1
   101  	ServerStatus_STOPPED   ServerStatus_StatusCode = 2
   102  	ServerStatus_PAUSED    ServerStatus_StatusCode = 3
   103  	ServerStatus_ERROR     ServerStatus_StatusCode = 4
   104  	ServerStatus_UNKNOWN   ServerStatus_StatusCode = 5
   105  )
   106  
   107  var ServerStatus_StatusCode_name = map[int32]string{
   108  	0: "UNDEFINED",
   109  	1: "STARTED",
   110  	2: "STOPPED",
   111  	3: "PAUSED",
   112  	4: "ERROR",
   113  	5: "UNKNOWN",
   114  }
   115  var ServerStatus_StatusCode_value = map[string]int32{
   116  	"UNDEFINED": 0,
   117  	"STARTED":   1,
   118  	"STOPPED":   2,
   119  	"PAUSED":    3,
   120  	"ERROR":     4,
   121  	"UNKNOWN":   5,
   122  }
   123  
   124  func (x ServerStatus_StatusCode) String() string {
   125  	return proto.EnumName(ServerStatus_StatusCode_name, int32(x))
   126  }
   127  func (ServerStatus_StatusCode) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 0} }
   128  
   129  type ServerStatus struct {
   130  	Status ServerStatus_StatusCode `protobuf:"varint,1,opt,name=status,enum=protos.ServerStatus_StatusCode" json:"status,omitempty"`
   131  }
   132  
   133  func (m *ServerStatus) Reset()                    { *m = ServerStatus{} }
   134  func (m *ServerStatus) String() string            { return proto.CompactTextString(m) }
   135  func (*ServerStatus) ProtoMessage()               {}
   136  func (*ServerStatus) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
   137  
   138  type LogLevelRequest struct {
   139  	LogModule string `protobuf:"bytes,1,opt,name=log_module,json=logModule" json:"log_module,omitempty"`
   140  	LogLevel  string `protobuf:"bytes,2,opt,name=log_level,json=logLevel" json:"log_level,omitempty"`
   141  }
   142  
   143  func (m *LogLevelRequest) Reset()                    { *m = LogLevelRequest{} }
   144  func (m *LogLevelRequest) String() string            { return proto.CompactTextString(m) }
   145  func (*LogLevelRequest) ProtoMessage()               {}
   146  func (*LogLevelRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
   147  
   148  type LogLevelResponse struct {
   149  	LogModule string `protobuf:"bytes,1,opt,name=log_module,json=logModule" json:"log_module,omitempty"`
   150  	LogLevel  string `protobuf:"bytes,2,opt,name=log_level,json=logLevel" json:"log_level,omitempty"`
   151  }
   152  
   153  func (m *LogLevelResponse) Reset()                    { *m = LogLevelResponse{} }
   154  func (m *LogLevelResponse) String() string            { return proto.CompactTextString(m) }
   155  func (*LogLevelResponse) ProtoMessage()               {}
   156  func (*LogLevelResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
   157  
   158  func init() {
   159  	proto.RegisterType((*ServerStatus)(nil), "protos.ServerStatus")
   160  	proto.RegisterType((*LogLevelRequest)(nil), "protos.LogLevelRequest")
   161  	proto.RegisterType((*LogLevelResponse)(nil), "protos.LogLevelResponse")
   162  	proto.RegisterEnum("protos.ServerStatus_StatusCode", ServerStatus_StatusCode_name, ServerStatus_StatusCode_value)
   163  }
   164  
   165  // Reference imports to suppress errors if they are not otherwise used.
   166  var _ context.Context
   167  var _ grpc.ClientConn
   168  
   169  // This is a compile-time assertion to ensure that this generated file
   170  // is compatible with the grpc package it is being compiled against.
   171  const _ = grpc.SupportPackageIsVersion3
   172  
   173  // Client API for Admin service
   174  
   175  type AdminClient interface {
   176  	// Return the serve status.
   177  	GetStatus(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*ServerStatus, error)
   178  	StartServer(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*ServerStatus, error)
   179  	StopServer(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*ServerStatus, error)
   180  	GetModuleLogLevel(ctx context.Context, in *LogLevelRequest, opts ...grpc.CallOption) (*LogLevelResponse, error)
   181  	SetModuleLogLevel(ctx context.Context, in *LogLevelRequest, opts ...grpc.CallOption) (*LogLevelResponse, error)
   182  	RevertLogLevels(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*google_protobuf.Empty, error)
   183  }
   184  
   185  type adminClient struct {
   186  	cc *grpc.ClientConn
   187  }
   188  
   189  func NewAdminClient(cc *grpc.ClientConn) AdminClient {
   190  	return &adminClient{cc}
   191  }
   192  
   193  func (c *adminClient) GetStatus(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*ServerStatus, error) {
   194  	out := new(ServerStatus)
   195  	err := grpc.Invoke(ctx, "/protos.Admin/GetStatus", in, out, c.cc, opts...)
   196  	if err != nil {
   197  		return nil, err
   198  	}
   199  	return out, nil
   200  }
   201  
   202  func (c *adminClient) StartServer(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*ServerStatus, error) {
   203  	out := new(ServerStatus)
   204  	err := grpc.Invoke(ctx, "/protos.Admin/StartServer", in, out, c.cc, opts...)
   205  	if err != nil {
   206  		return nil, err
   207  	}
   208  	return out, nil
   209  }
   210  
   211  func (c *adminClient) StopServer(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*ServerStatus, error) {
   212  	out := new(ServerStatus)
   213  	err := grpc.Invoke(ctx, "/protos.Admin/StopServer", in, out, c.cc, opts...)
   214  	if err != nil {
   215  		return nil, err
   216  	}
   217  	return out, nil
   218  }
   219  
   220  func (c *adminClient) GetModuleLogLevel(ctx context.Context, in *LogLevelRequest, opts ...grpc.CallOption) (*LogLevelResponse, error) {
   221  	out := new(LogLevelResponse)
   222  	err := grpc.Invoke(ctx, "/protos.Admin/GetModuleLogLevel", in, out, c.cc, opts...)
   223  	if err != nil {
   224  		return nil, err
   225  	}
   226  	return out, nil
   227  }
   228  
   229  func (c *adminClient) SetModuleLogLevel(ctx context.Context, in *LogLevelRequest, opts ...grpc.CallOption) (*LogLevelResponse, error) {
   230  	out := new(LogLevelResponse)
   231  	err := grpc.Invoke(ctx, "/protos.Admin/SetModuleLogLevel", in, out, c.cc, opts...)
   232  	if err != nil {
   233  		return nil, err
   234  	}
   235  	return out, nil
   236  }
   237  
   238  func (c *adminClient) RevertLogLevels(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*google_protobuf.Empty, error) {
   239  	out := new(google_protobuf.Empty)
   240  	err := grpc.Invoke(ctx, "/protos.Admin/RevertLogLevels", in, out, c.cc, opts...)
   241  	if err != nil {
   242  		return nil, err
   243  	}
   244  	return out, nil
   245  }
   246  
   247  // Server API for Admin service
   248  
   249  type AdminServer interface {
   250  	// Return the serve status.
   251  	GetStatus(context.Context, *google_protobuf.Empty) (*ServerStatus, error)
   252  	StartServer(context.Context, *google_protobuf.Empty) (*ServerStatus, error)
   253  	StopServer(context.Context, *google_protobuf.Empty) (*ServerStatus, error)
   254  	GetModuleLogLevel(context.Context, *LogLevelRequest) (*LogLevelResponse, error)
   255  	SetModuleLogLevel(context.Context, *LogLevelRequest) (*LogLevelResponse, error)
   256  	RevertLogLevels(context.Context, *google_protobuf.Empty) (*google_protobuf.Empty, error)
   257  }
   258  
   259  func RegisterAdminServer(s *grpc.Server, srv AdminServer) {
   260  	s.RegisterService(&_Admin_serviceDesc, srv)
   261  }
   262  
   263  func _Admin_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   264  	in := new(google_protobuf.Empty)
   265  	if err := dec(in); err != nil {
   266  		return nil, err
   267  	}
   268  	if interceptor == nil {
   269  		return srv.(AdminServer).GetStatus(ctx, in)
   270  	}
   271  	info := &grpc.UnaryServerInfo{
   272  		Server:     srv,
   273  		FullMethod: "/protos.Admin/GetStatus",
   274  	}
   275  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   276  		return srv.(AdminServer).GetStatus(ctx, req.(*google_protobuf.Empty))
   277  	}
   278  	return interceptor(ctx, in, info, handler)
   279  }
   280  
   281  func _Admin_StartServer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   282  	in := new(google_protobuf.Empty)
   283  	if err := dec(in); err != nil {
   284  		return nil, err
   285  	}
   286  	if interceptor == nil {
   287  		return srv.(AdminServer).StartServer(ctx, in)
   288  	}
   289  	info := &grpc.UnaryServerInfo{
   290  		Server:     srv,
   291  		FullMethod: "/protos.Admin/StartServer",
   292  	}
   293  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   294  		return srv.(AdminServer).StartServer(ctx, req.(*google_protobuf.Empty))
   295  	}
   296  	return interceptor(ctx, in, info, handler)
   297  }
   298  
   299  func _Admin_StopServer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   300  	in := new(google_protobuf.Empty)
   301  	if err := dec(in); err != nil {
   302  		return nil, err
   303  	}
   304  	if interceptor == nil {
   305  		return srv.(AdminServer).StopServer(ctx, in)
   306  	}
   307  	info := &grpc.UnaryServerInfo{
   308  		Server:     srv,
   309  		FullMethod: "/protos.Admin/StopServer",
   310  	}
   311  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   312  		return srv.(AdminServer).StopServer(ctx, req.(*google_protobuf.Empty))
   313  	}
   314  	return interceptor(ctx, in, info, handler)
   315  }
   316  
   317  func _Admin_GetModuleLogLevel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   318  	in := new(LogLevelRequest)
   319  	if err := dec(in); err != nil {
   320  		return nil, err
   321  	}
   322  	if interceptor == nil {
   323  		return srv.(AdminServer).GetModuleLogLevel(ctx, in)
   324  	}
   325  	info := &grpc.UnaryServerInfo{
   326  		Server:     srv,
   327  		FullMethod: "/protos.Admin/GetModuleLogLevel",
   328  	}
   329  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   330  		return srv.(AdminServer).GetModuleLogLevel(ctx, req.(*LogLevelRequest))
   331  	}
   332  	return interceptor(ctx, in, info, handler)
   333  }
   334  
   335  func _Admin_SetModuleLogLevel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   336  	in := new(LogLevelRequest)
   337  	if err := dec(in); err != nil {
   338  		return nil, err
   339  	}
   340  	if interceptor == nil {
   341  		return srv.(AdminServer).SetModuleLogLevel(ctx, in)
   342  	}
   343  	info := &grpc.UnaryServerInfo{
   344  		Server:     srv,
   345  		FullMethod: "/protos.Admin/SetModuleLogLevel",
   346  	}
   347  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   348  		return srv.(AdminServer).SetModuleLogLevel(ctx, req.(*LogLevelRequest))
   349  	}
   350  	return interceptor(ctx, in, info, handler)
   351  }
   352  
   353  func _Admin_RevertLogLevels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   354  	in := new(google_protobuf.Empty)
   355  	if err := dec(in); err != nil {
   356  		return nil, err
   357  	}
   358  	if interceptor == nil {
   359  		return srv.(AdminServer).RevertLogLevels(ctx, in)
   360  	}
   361  	info := &grpc.UnaryServerInfo{
   362  		Server:     srv,
   363  		FullMethod: "/protos.Admin/RevertLogLevels",
   364  	}
   365  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   366  		return srv.(AdminServer).RevertLogLevels(ctx, req.(*google_protobuf.Empty))
   367  	}
   368  	return interceptor(ctx, in, info, handler)
   369  }
   370  
   371  var _Admin_serviceDesc = grpc.ServiceDesc{
   372  	ServiceName: "protos.Admin",
   373  	HandlerType: (*AdminServer)(nil),
   374  	Methods: []grpc.MethodDesc{
   375  		{
   376  			MethodName: "GetStatus",
   377  			Handler:    _Admin_GetStatus_Handler,
   378  		},
   379  		{
   380  			MethodName: "StartServer",
   381  			Handler:    _Admin_StartServer_Handler,
   382  		},
   383  		{
   384  			MethodName: "StopServer",
   385  			Handler:    _Admin_StopServer_Handler,
   386  		},
   387  		{
   388  			MethodName: "GetModuleLogLevel",
   389  			Handler:    _Admin_GetModuleLogLevel_Handler,
   390  		},
   391  		{
   392  			MethodName: "SetModuleLogLevel",
   393  			Handler:    _Admin_SetModuleLogLevel_Handler,
   394  		},
   395  		{
   396  			MethodName: "RevertLogLevels",
   397  			Handler:    _Admin_RevertLogLevels_Handler,
   398  		},
   399  	},
   400  	Streams:  []grpc.StreamDesc{},
   401  	Metadata: fileDescriptor0,
   402  }
   403  
   404  func init() { proto.RegisterFile("peer/admin.proto", fileDescriptor0) }
   405  
   406  var fileDescriptor0 = []byte{
   407  	// 424 bytes of a gzipped FileDescriptorProto
   408  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0x93, 0xc1, 0x6f, 0xd3, 0x30,
   409  	0x14, 0xc6, 0xdb, 0x8d, 0x16, 0xf2, 0x36, 0x98, 0xb1, 0x10, 0x54, 0x9d, 0x10, 0x28, 0x27, 0xb8,
   410  	0x38, 0xd2, 0x38, 0x70, 0x00, 0x0e, 0xdd, 0x12, 0x06, 0x62, 0x4b, 0x2b, 0x67, 0x15, 0x02, 0x09,
   411  	0x4d, 0x69, 0xf3, 0xe6, 0x55, 0x38, 0x73, 0xb0, 0x9d, 0x4a, 0xfb, 0x57, 0x38, 0xf2, 0x97, 0x22,
   412  	0xc7, 0x8d, 0x36, 0x01, 0x3d, 0x00, 0x3b, 0x39, 0xef, 0xbd, 0xef, 0xfb, 0x92, 0xfc, 0xac, 0x07,
   413  	0xa4, 0x42, 0xd4, 0x51, 0x5e, 0x94, 0x8b, 0x0b, 0x56, 0x69, 0x65, 0x15, 0xed, 0x37, 0x87, 0x19,
   414  	0xee, 0x0a, 0xa5, 0x84, 0xc4, 0xa8, 0x29, 0x67, 0xf5, 0x59, 0x84, 0x65, 0x65, 0x2f, 0xbd, 0x28,
   415  	0xfc, 0xd1, 0x85, 0xed, 0x0c, 0xf5, 0x12, 0x75, 0x66, 0x73, 0x5b, 0x1b, 0xfa, 0x12, 0xfa, 0xa6,
   416  	0x79, 0x1a, 0x74, 0x9f, 0x76, 0x9f, 0xdd, 0xdb, 0x7b, 0xe2, 0x85, 0x86, 0x5d, 0x57, 0x31, 0x7f,
   417  	0x1c, 0xa8, 0x02, 0xf9, 0x4a, 0x1e, 0x7e, 0x02, 0xb8, 0xea, 0xd2, 0xbb, 0x10, 0x4c, 0xd3, 0x38,
   418  	0x79, 0xfb, 0x3e, 0x4d, 0x62, 0xd2, 0xa1, 0x5b, 0x70, 0x3b, 0x3b, 0x19, 0xf1, 0x93, 0x24, 0x26,
   419  	0x5d, 0x5f, 0x8c, 0x27, 0x93, 0x24, 0x26, 0x1b, 0x14, 0xa0, 0x3f, 0x19, 0x4d, 0xb3, 0x24, 0x26,
   420  	0x9b, 0x34, 0x80, 0x5e, 0xc2, 0xf9, 0x98, 0x93, 0x5b, 0x4e, 0x33, 0x4d, 0x3f, 0xa4, 0xe3, 0x8f,
   421  	0x29, 0xe9, 0x85, 0xc7, 0xb0, 0x73, 0xa4, 0xc4, 0x11, 0x2e, 0x51, 0x72, 0xfc, 0x56, 0xa3, 0xb1,
   422  	0xf4, 0x31, 0x80, 0x54, 0xe2, 0xb4, 0x54, 0x45, 0x2d, 0xb1, 0xf9, 0xd4, 0x80, 0x07, 0x52, 0x89,
   423  	0xe3, 0xa6, 0x41, 0x77, 0xc1, 0x15, 0xa7, 0xd2, 0x59, 0x06, 0x1b, 0xcd, 0xf4, 0x8e, 0x5c, 0x45,
   424  	0x84, 0x29, 0x90, 0xab, 0x38, 0x53, 0xa9, 0x0b, 0x83, 0xff, 0x93, 0xb7, 0xf7, 0x7d, 0x13, 0x7a,
   425  	0x23, 0x07, 0x9e, 0xbe, 0x82, 0xe0, 0x10, 0xed, 0x8a, 0xe4, 0x43, 0xe6, 0xc1, 0xb3, 0x16, 0x3c,
   426  	0x4b, 0x1c, 0xf8, 0xe1, 0x83, 0x3f, 0x11, 0x0d, 0x3b, 0xf4, 0x0d, 0x6c, 0x65, 0x36, 0xd7, 0xd6,
   427  	0xb7, 0xff, 0xda, 0xfe, 0xda, 0xf1, 0x57, 0xd5, 0x3f, 0xba, 0xdf, 0xc1, 0xfd, 0x43, 0xb4, 0xfe,
   428  	0x6f, 0x5b, 0x38, 0xf4, 0x51, 0x2b, 0xfe, 0x85, 0xfe, 0x70, 0xf0, 0xfb, 0xc0, 0x73, 0xf4, 0x49,
   429  	0xd9, 0xcd, 0x24, 0x1d, 0xc0, 0x0e, 0xc7, 0x25, 0x6a, 0xdb, 0xce, 0xd6, 0x33, 0x5d, 0xd3, 0x0f,
   430  	0x3b, 0xfb, 0x5f, 0x20, 0x54, 0x5a, 0xb0, 0xf3, 0xcb, 0x0a, 0xb5, 0xc4, 0x42, 0xa0, 0x66, 0x67,
   431  	0xf9, 0x4c, 0x2f, 0xe6, 0xed, 0x8b, 0xdd, 0xde, 0xec, 0x6f, 0x37, 0xf7, 0x37, 0xc9, 0xe7, 0x5f,
   432  	0x73, 0x81, 0x9f, 0x9f, 0x8b, 0x85, 0x3d, 0xaf, 0x67, 0x6c, 0xae, 0xca, 0xe8, 0x9a, 0x31, 0xf2,
   433  	0x46, 0xbf, 0x48, 0x26, 0x72, 0xc6, 0x99, 0x5f, 0xb2, 0x17, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff,
   434  	0x56, 0xdf, 0xc6, 0xa2, 0x7f, 0x03, 0x00, 0x00,
   435  }