api

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package protos is a generated protocol buffer package.

It is generated from these files:

peer/channelevents.proto

It has these top-level messages:

RegisterChannel
DeregisterChannel
ChannelServiceRequest
ChannelServiceResponse
ChannelServiceResult
ChannelResult

Index

Constants

This section is empty.

Variables

View Source
var HeaderType_name = map[int32]string{
	0: "MESSAGE",
	1: "CONFIG",
	2: "CONFIG_UPDATE",
	3: "ENDORSER_TRANSACTION",
	4: "ORDERER_TRANSACTION",
	5: "DELIVER_SEEK_INFO",
	6: "CHAINCODE_PACKAGE",
	7: "PEER_RESOURCE_UPDATE",
	8: "CHANNEL_SERVICE_REQUEST",
}
View Source
var HeaderType_value = map[string]int32{
	"MESSAGE":                 0,
	"CONFIG":                  1,
	"CONFIG_UPDATE":           2,
	"ENDORSER_TRANSACTION":    3,
	"ORDERER_TRANSACTION":     4,
	"DELIVER_SEEK_INFO":       5,
	"CHAINCODE_PACKAGE":       6,
	"PEER_RESOURCE_UPDATE":    7,
	"CHANNEL_SERVICE_REQUEST": 8,
}

Functions

func RegisterChannelServer

func RegisterChannelServer(s *grpc.Server, srv ChannelServer)

Types

type ChannelClient

type ChannelClient interface {
	Chat(ctx context.Context, opts ...grpc.CallOption) (Channel_ChatClient, error)
}

func NewChannelClient

func NewChannelClient(cc *grpc.ClientConn) ChannelClient

type ChannelResult

type ChannelResult struct {
	ChannelId        string   `protobuf:"bytes,1,opt,name=channel_id,json=channelId" json:"channel_id,omitempty"`
	RegisteredEvents []string `protobuf:"bytes,2,rep,name=registered_events,json=registeredEvents" json:"registered_events,omitempty"`
	ErrorMsg         string   `protobuf:"bytes,3,opt,name=error_msg,json=errorMsg" json:"error_msg,omitempty"`
}

ChannelResult holds information about each action that was requested by the client. registered_events holds the events the client expressed interest in and has access to based on any ACL that is present. An empty error message

means that the action was successful. Otherwise, it will contain context

about the reason for failure.

func (*ChannelResult) Descriptor

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

func (*ChannelResult) GetChannelId

func (m *ChannelResult) GetChannelId() string

func (*ChannelResult) GetErrorMsg

func (m *ChannelResult) GetErrorMsg() string

func (*ChannelResult) GetRegisteredEvents

func (m *ChannelResult) GetRegisteredEvents() []string

func (*ChannelResult) ProtoMessage

func (*ChannelResult) ProtoMessage()

func (*ChannelResult) Reset

func (m *ChannelResult) Reset()

func (*ChannelResult) String

func (m *ChannelResult) String() string

type ChannelServer

type ChannelServer interface {
	Chat(Channel_ChatServer) error
}

type ChannelServiceRequest

type ChannelServiceRequest struct {
	// Types that are valid to be assigned to Request:
	//	*ChannelServiceRequest_RegisterChannel
	//	*ChannelServiceRequest_DeregisterChannel
	Request isChannelServiceRequest_Request `protobuf_oneof:"request"`
}

func (*ChannelServiceRequest) Descriptor

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

func (*ChannelServiceRequest) GetDeregisterChannel

func (m *ChannelServiceRequest) GetDeregisterChannel() *DeregisterChannel

func (*ChannelServiceRequest) GetRegisterChannel

func (m *ChannelServiceRequest) GetRegisterChannel() *RegisterChannel

func (*ChannelServiceRequest) GetRequest

func (m *ChannelServiceRequest) GetRequest() isChannelServiceRequest_Request

func (*ChannelServiceRequest) ProtoMessage

func (*ChannelServiceRequest) ProtoMessage()

func (*ChannelServiceRequest) Reset

func (m *ChannelServiceRequest) Reset()

func (*ChannelServiceRequest) String

func (m *ChannelServiceRequest) String() string

func (*ChannelServiceRequest) XXX_OneofFuncs

func (*ChannelServiceRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

type ChannelServiceRequest_DeregisterChannel

type ChannelServiceRequest_DeregisterChannel struct {
	DeregisterChannel *DeregisterChannel `protobuf:"bytes,2,opt,name=deregister_channel,json=deregisterChannel,oneof"`
}

type ChannelServiceRequest_RegisterChannel

type ChannelServiceRequest_RegisterChannel struct {
	RegisterChannel *RegisterChannel `protobuf:"bytes,1,opt,name=register_channel,json=registerChannel,oneof"`
}

type ChannelServiceResponse

type ChannelServiceResponse struct {
	// Types that are valid to be assigned to Response:
	//	*ChannelServiceResponse_Result
	//	*ChannelServiceResponse_Event
	Response isChannelServiceResponse_Response `protobuf_oneof:"response"`
}

func (*ChannelServiceResponse) Descriptor

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

func (*ChannelServiceResponse) GetEvent

func (m *ChannelServiceResponse) GetEvent() *protos4.Event

func (*ChannelServiceResponse) GetResponse

func (m *ChannelServiceResponse) GetResponse() isChannelServiceResponse_Response

func (*ChannelServiceResponse) GetResult

func (*ChannelServiceResponse) ProtoMessage

func (*ChannelServiceResponse) ProtoMessage()

func (*ChannelServiceResponse) Reset

func (m *ChannelServiceResponse) Reset()

func (*ChannelServiceResponse) String

func (m *ChannelServiceResponse) String() string

func (*ChannelServiceResponse) XXX_OneofFuncs

func (*ChannelServiceResponse) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

type ChannelServiceResponse_Event

type ChannelServiceResponse_Event struct {
	Event *protos4.Event `protobuf:"bytes,2,opt,name=event,oneof"`
}

type ChannelServiceResponse_Result

type ChannelServiceResponse_Result struct {
	Result *ChannelServiceResult `protobuf:"bytes,1,opt,name=result,oneof"`
}

type ChannelServiceResult

type ChannelServiceResult struct {
	Action         string           `protobuf:"bytes,1,opt,name=action" json:"action,omitempty"`
	Success        bool             `protobuf:"varint,2,opt,name=success" json:"success,omitempty"`
	ChannelResults []*ChannelResult `protobuf:"bytes,3,rep,name=channel_results,json=channelResults" json:"channel_results,omitempty"`
}

ChannelServiceResult returns information about registration/deregistration actions on the server to the client. The possible actions are currently RegisterChannel and DeregisterChannel. Success indicates whether the action succeeded for all channels.

func (*ChannelServiceResult) Descriptor

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

func (*ChannelServiceResult) GetAction

func (m *ChannelServiceResult) GetAction() string

func (*ChannelServiceResult) GetChannelResults

func (m *ChannelServiceResult) GetChannelResults() []*ChannelResult

func (*ChannelServiceResult) GetSuccess

func (m *ChannelServiceResult) GetSuccess() bool

func (*ChannelServiceResult) ProtoMessage

func (*ChannelServiceResult) ProtoMessage()

func (*ChannelServiceResult) Reset

func (m *ChannelServiceResult) Reset()

func (*ChannelServiceResult) String

func (m *ChannelServiceResult) String() string

type Channel_ChatClient

type Channel_ChatClient interface {
	Send(*common.Envelope) error
	Recv() (*ChannelServiceResponse, error)
	grpc.ClientStream
}

type Channel_ChatServer

type Channel_ChatServer interface {
	Send(*ChannelServiceResponse) error
	Recv() (*common.Envelope, error)
	grpc.ServerStream
}

type DeregisterChannel

type DeregisterChannel struct {
	ChannelIds []string `protobuf:"bytes,1,rep,name=channel_ids,json=channelIds" json:"channel_ids,omitempty"`
}

func (*DeregisterChannel) Descriptor

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

func (*DeregisterChannel) GetChannelIds

func (m *DeregisterChannel) GetChannelIds() []string

func (*DeregisterChannel) ProtoMessage

func (*DeregisterChannel) ProtoMessage()

func (*DeregisterChannel) Reset

func (m *DeregisterChannel) Reset()

func (*DeregisterChannel) String

func (m *DeregisterChannel) String() string

type HeaderType

type HeaderType int32
const (
	HeaderType_MESSAGE                 HeaderType = 0
	HeaderType_CONFIG                  HeaderType = 1
	HeaderType_CONFIG_UPDATE           HeaderType = 2
	HeaderType_ENDORSER_TRANSACTION    HeaderType = 3
	HeaderType_ORDERER_TRANSACTION     HeaderType = 4
	HeaderType_DELIVER_SEEK_INFO       HeaderType = 5
	HeaderType_CHAINCODE_PACKAGE       HeaderType = 6
	HeaderType_PEER_RESOURCE_UPDATE    HeaderType = 7
	HeaderType_CHANNEL_SERVICE_REQUEST HeaderType = 8
)

func (HeaderType) EnumDescriptor

func (HeaderType) EnumDescriptor() ([]byte, []int)

func (HeaderType) String

func (x HeaderType) String() string

type RegisterChannel

type RegisterChannel struct {
	ChannelIds []string            `protobuf:"bytes,1,rep,name=channel_ids,json=channelIds" json:"channel_ids,omitempty"`
	Events     []*protos4.Interest `protobuf:"bytes,2,rep,name=events" json:"events,omitempty"`
}

func (*RegisterChannel) Descriptor

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

func (*RegisterChannel) GetChannelIds

func (m *RegisterChannel) GetChannelIds() []string

func (*RegisterChannel) GetEvents

func (m *RegisterChannel) GetEvents() []*protos4.Interest

func (*RegisterChannel) ProtoMessage

func (*RegisterChannel) ProtoMessage()

func (*RegisterChannel) Reset

func (m *RegisterChannel) Reset()

func (*RegisterChannel) String

func (m *RegisterChannel) String() string

Jump to

Keyboard shortcuts

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