pb

package
v0.0.0-...-cae5519 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2020 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Permission_name = map[int32]string{
		0: "UNKNOWN_PERMISSION",
		1: "READ",
		2: "WRITE",
		3: "DELETE",
		4: "MODIFY",
		5: "KICK",
		6: "BAN",
		7: "ASSIGN_ROLE",
		8: "REMOVE_CHANNEL",
	}
	Permission_value = map[string]int32{
		"UNKNOWN_PERMISSION": 0,
		"READ":               1,
		"WRITE":              2,
		"DELETE":             3,
		"MODIFY":             4,
		"KICK":               5,
		"BAN":                6,
		"ASSIGN_ROLE":        7,
		"REMOVE_CHANNEL":     8,
	}
)

Enum value maps for Permission.

View Source
var (
	Role_name = map[int32]string{
		0: "UNKNOWN_ROLE",
		1: "SUBSCRIBER",
		2: "MEMBER",
		3: "ADMIN",
		4: "SUPERADMIN",
	}
	Role_value = map[string]int32{
		"UNKNOWN_ROLE": 0,
		"SUBSCRIBER":   1,
		"MEMBER":       2,
		"ADMIN":        3,
		"SUPERADMIN":   4,
	}
)

Enum value maps for Role.

View Source
var File_accord_proto protoreflect.FileDescriptor
View Source
var File_auth_service_proto protoreflect.FileDescriptor

Functions

func RegisterAuthServiceServer

func RegisterAuthServiceServer(s *grpc.Server, srv AuthServiceServer)

func RegisterChatServer

func RegisterChatServer(s *grpc.Server, srv ChatServer)

Types

type AddChannelRequest

type AddChannelRequest struct {
	Name     string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	IsPublic bool   `protobuf:"varint,2,opt,name=isPublic,proto3" json:"isPublic,omitempty"`
	// contains filtered or unexported fields
}

func (*AddChannelRequest) Descriptor deprecated

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

Deprecated: Use AddChannelRequest.ProtoReflect.Descriptor instead.

func (*AddChannelRequest) GetIsPublic

func (x *AddChannelRequest) GetIsPublic() bool

func (*AddChannelRequest) GetName

func (x *AddChannelRequest) GetName() string

func (*AddChannelRequest) ProtoMessage

func (*AddChannelRequest) ProtoMessage()

func (*AddChannelRequest) ProtoReflect

func (x *AddChannelRequest) ProtoReflect() protoreflect.Message

func (*AddChannelRequest) Reset

func (x *AddChannelRequest) Reset()

func (*AddChannelRequest) String

func (x *AddChannelRequest) String() string

type AddChannelResponse

type AddChannelResponse struct {
	ChannelId uint64 `protobuf:"fixed64,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
	// contains filtered or unexported fields
}

func (*AddChannelResponse) Descriptor deprecated

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

Deprecated: Use AddChannelResponse.ProtoReflect.Descriptor instead.

func (*AddChannelResponse) GetChannelId

func (x *AddChannelResponse) GetChannelId() uint64

func (*AddChannelResponse) ProtoMessage

func (*AddChannelResponse) ProtoMessage()

func (*AddChannelResponse) ProtoReflect

func (x *AddChannelResponse) ProtoReflect() protoreflect.Message

func (*AddChannelResponse) Reset

func (x *AddChannelResponse) Reset()

func (*AddChannelResponse) String

func (x *AddChannelResponse) String() string

type AuthServiceClient

type AuthServiceClient interface {
	CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error)
	Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)
	Logout(ctx context.Context, in *LogoutRequest, opts ...grpc.CallOption) (*LogoutResponse, error)
}

AuthServiceClient is the client API for AuthService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type AuthServiceServer

type AuthServiceServer interface {
	CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error)
	Login(context.Context, *LoginRequest) (*LoginResponse, error)
	Logout(context.Context, *LogoutRequest) (*LogoutResponse, error)
}

AuthServiceServer is the server API for AuthService service.

type ChannelConfigMessage

type ChannelConfigMessage struct {

	// Types that are assignable to Msg:
	//	*ChannelConfigMessage_NameMsg
	//	*ChannelConfigMessage_RoleMsg
	//	*ChannelConfigMessage_PinMsg
	Msg isChannelConfigMessage_Msg `protobuf_oneof:"msg"`
	// contains filtered or unexported fields
}

Used in ChannelStreamRequest- and Response to initiate and broadcast channel-related changes.

func (*ChannelConfigMessage) Descriptor deprecated

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

Deprecated: Use ChannelConfigMessage.ProtoReflect.Descriptor instead.

func (*ChannelConfigMessage) GetMsg

func (m *ChannelConfigMessage) GetMsg() isChannelConfigMessage_Msg

func (*ChannelConfigMessage) GetNameMsg

func (*ChannelConfigMessage) GetPinMsg

func (*ChannelConfigMessage) GetRoleMsg

func (*ChannelConfigMessage) ProtoMessage

func (*ChannelConfigMessage) ProtoMessage()

func (*ChannelConfigMessage) ProtoReflect

func (x *ChannelConfigMessage) ProtoReflect() protoreflect.Message

func (*ChannelConfigMessage) Reset

func (x *ChannelConfigMessage) Reset()

func (*ChannelConfigMessage) String

func (x *ChannelConfigMessage) String() string

type ChannelConfigMessage_NameChannelConfigMessage

type ChannelConfigMessage_NameChannelConfigMessage struct {
	NewChannelName string `protobuf:"bytes,1,opt,name=new_channel_name,json=newChannelName,proto3" json:"new_channel_name,omitempty"`
	// contains filtered or unexported fields
}

func (*ChannelConfigMessage_NameChannelConfigMessage) Descriptor deprecated

Deprecated: Use ChannelConfigMessage_NameChannelConfigMessage.ProtoReflect.Descriptor instead.

func (*ChannelConfigMessage_NameChannelConfigMessage) GetNewChannelName

func (*ChannelConfigMessage_NameChannelConfigMessage) ProtoMessage

func (*ChannelConfigMessage_NameChannelConfigMessage) ProtoReflect

func (*ChannelConfigMessage_NameChannelConfigMessage) Reset

func (*ChannelConfigMessage_NameChannelConfigMessage) String

type ChannelConfigMessage_NameMsg

type ChannelConfigMessage_NameMsg struct {
	NameMsg *ChannelConfigMessage_NameChannelConfigMessage `protobuf:"bytes,1,opt,name=name_msg,json=nameMsg,proto3,oneof"`
}

type ChannelConfigMessage_PinChannelConfigMessage

type ChannelConfigMessage_PinChannelConfigMessage struct {
	MessageId uint64 `protobuf:"fixed64,1,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"`
	// contains filtered or unexported fields
}

func (*ChannelConfigMessage_PinChannelConfigMessage) Descriptor deprecated

Deprecated: Use ChannelConfigMessage_PinChannelConfigMessage.ProtoReflect.Descriptor instead.

func (*ChannelConfigMessage_PinChannelConfigMessage) GetMessageId

func (*ChannelConfigMessage_PinChannelConfigMessage) ProtoMessage

func (*ChannelConfigMessage_PinChannelConfigMessage) ProtoReflect

func (*ChannelConfigMessage_PinChannelConfigMessage) Reset

func (*ChannelConfigMessage_PinChannelConfigMessage) String

type ChannelConfigMessage_PinMsg

type ChannelConfigMessage_PinMsg struct {
	PinMsg *ChannelConfigMessage_PinChannelConfigMessage `protobuf:"bytes,3,opt,name=pin_msg,json=pinMsg,proto3,oneof"`
}

type ChannelConfigMessage_RoleChannelConfigMessage

type ChannelConfigMessage_RoleChannelConfigMessage struct {
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Role     Role   `protobuf:"varint,2,opt,name=role,proto3,enum=accord.Role" json:"role,omitempty"`
	// contains filtered or unexported fields
}

func (*ChannelConfigMessage_RoleChannelConfigMessage) Descriptor deprecated

Deprecated: Use ChannelConfigMessage_RoleChannelConfigMessage.ProtoReflect.Descriptor instead.

func (*ChannelConfigMessage_RoleChannelConfigMessage) GetRole

func (*ChannelConfigMessage_RoleChannelConfigMessage) GetUsername

func (*ChannelConfigMessage_RoleChannelConfigMessage) ProtoMessage

func (*ChannelConfigMessage_RoleChannelConfigMessage) ProtoReflect

func (*ChannelConfigMessage_RoleChannelConfigMessage) Reset

func (*ChannelConfigMessage_RoleChannelConfigMessage) String

type ChannelConfigMessage_RoleMsg

type ChannelConfigMessage_RoleMsg struct {
	RoleMsg *ChannelConfigMessage_RoleChannelConfigMessage `protobuf:"bytes,2,opt,name=role_msg,json=roleMsg,proto3,oneof"`
}

type ChannelStreamRequest

type ChannelStreamRequest struct {
	ChannelId uint64 `protobuf:"fixed64,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
	// Types that are assignable to Msg:
	//	*ChannelStreamRequest_UserMsg
	//	*ChannelStreamRequest_ConfigMsg
	Msg isChannelStreamRequest_Msg `protobuf_oneof:"msg"`
	// contains filtered or unexported fields
}

Stream response for bidirectional streaming of user and config messages with a single channel.

func (*ChannelStreamRequest) Descriptor deprecated

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

Deprecated: Use ChannelStreamRequest.ProtoReflect.Descriptor instead.

func (*ChannelStreamRequest) GetChannelId

func (x *ChannelStreamRequest) GetChannelId() uint64

func (*ChannelStreamRequest) GetConfigMsg

func (x *ChannelStreamRequest) GetConfigMsg() *ChannelConfigMessage

func (*ChannelStreamRequest) GetMsg

func (m *ChannelStreamRequest) GetMsg() isChannelStreamRequest_Msg

func (*ChannelStreamRequest) GetUserMsg

func (*ChannelStreamRequest) ProtoMessage

func (*ChannelStreamRequest) ProtoMessage()

func (*ChannelStreamRequest) ProtoReflect

func (x *ChannelStreamRequest) ProtoReflect() protoreflect.Message

func (*ChannelStreamRequest) Reset

func (x *ChannelStreamRequest) Reset()

func (*ChannelStreamRequest) String

func (x *ChannelStreamRequest) String() string

type ChannelStreamRequest_ConfigMsg

type ChannelStreamRequest_ConfigMsg struct {
	ConfigMsg *ChannelConfigMessage `protobuf:"bytes,3,opt,name=config_msg,json=configMsg,proto3,oneof"`
}

type ChannelStreamRequest_UserMessage

type ChannelStreamRequest_UserMessage struct {

	// Types that are assignable to UserMsg:
	//	*ChannelStreamRequest_UserMessage_NewUserMsg
	//	*ChannelStreamRequest_UserMessage_EditUserMsg
	//	*ChannelStreamRequest_UserMessage_DeleteUserMsg
	UserMsg isChannelStreamRequest_UserMessage_UserMsg `protobuf_oneof:"user_msg"`
	// contains filtered or unexported fields
}

func (*ChannelStreamRequest_UserMessage) Descriptor deprecated

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

Deprecated: Use ChannelStreamRequest_UserMessage.ProtoReflect.Descriptor instead.

func (*ChannelStreamRequest_UserMessage) GetDeleteUserMsg

func (*ChannelStreamRequest_UserMessage) GetEditUserMsg

func (*ChannelStreamRequest_UserMessage) GetNewUserMsg

func (*ChannelStreamRequest_UserMessage) GetUserMsg

func (m *ChannelStreamRequest_UserMessage) GetUserMsg() isChannelStreamRequest_UserMessage_UserMsg

func (*ChannelStreamRequest_UserMessage) ProtoMessage

func (*ChannelStreamRequest_UserMessage) ProtoMessage()

func (*ChannelStreamRequest_UserMessage) ProtoReflect

func (*ChannelStreamRequest_UserMessage) Reset

func (*ChannelStreamRequest_UserMessage) String

type ChannelStreamRequest_UserMessage_DeleteUserMessage

type ChannelStreamRequest_UserMessage_DeleteUserMessage struct {
	MessageId uint64 `protobuf:"fixed64,1,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"`
	// contains filtered or unexported fields
}

func (*ChannelStreamRequest_UserMessage_DeleteUserMessage) Descriptor deprecated

Deprecated: Use ChannelStreamRequest_UserMessage_DeleteUserMessage.ProtoReflect.Descriptor instead.

func (*ChannelStreamRequest_UserMessage_DeleteUserMessage) GetMessageId

func (*ChannelStreamRequest_UserMessage_DeleteUserMessage) ProtoMessage

func (*ChannelStreamRequest_UserMessage_DeleteUserMessage) ProtoReflect

func (*ChannelStreamRequest_UserMessage_DeleteUserMessage) Reset

func (*ChannelStreamRequest_UserMessage_DeleteUserMessage) String

type ChannelStreamRequest_UserMessage_DeleteUserMsg

type ChannelStreamRequest_UserMessage_DeleteUserMsg struct {
	DeleteUserMsg *ChannelStreamRequest_UserMessage_DeleteUserMessage `protobuf:"bytes,3,opt,name=delete_user_msg,json=deleteUserMsg,proto3,oneof"`
}

type ChannelStreamRequest_UserMessage_EditUserMessage

type ChannelStreamRequest_UserMessage_EditUserMessage struct {
	MessageId uint64 `protobuf:"fixed64,1,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"`
	Content   string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

func (*ChannelStreamRequest_UserMessage_EditUserMessage) Descriptor deprecated

Deprecated: Use ChannelStreamRequest_UserMessage_EditUserMessage.ProtoReflect.Descriptor instead.

func (*ChannelStreamRequest_UserMessage_EditUserMessage) GetContent

func (*ChannelStreamRequest_UserMessage_EditUserMessage) GetMessageId

func (*ChannelStreamRequest_UserMessage_EditUserMessage) ProtoMessage

func (*ChannelStreamRequest_UserMessage_EditUserMessage) ProtoReflect

func (*ChannelStreamRequest_UserMessage_EditUserMessage) Reset

func (*ChannelStreamRequest_UserMessage_EditUserMessage) String

type ChannelStreamRequest_UserMessage_EditUserMsg

type ChannelStreamRequest_UserMessage_EditUserMsg struct {
	EditUserMsg *ChannelStreamRequest_UserMessage_EditUserMessage `protobuf:"bytes,2,opt,name=edit_user_msg,json=editUserMsg,proto3,oneof"`
}

type ChannelStreamRequest_UserMessage_NewUserMessage

type ChannelStreamRequest_UserMessage_NewUserMessage struct {
	Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

func (*ChannelStreamRequest_UserMessage_NewUserMessage) Descriptor deprecated

Deprecated: Use ChannelStreamRequest_UserMessage_NewUserMessage.ProtoReflect.Descriptor instead.

func (*ChannelStreamRequest_UserMessage_NewUserMessage) GetContent

func (*ChannelStreamRequest_UserMessage_NewUserMessage) ProtoMessage

func (*ChannelStreamRequest_UserMessage_NewUserMessage) ProtoReflect

func (*ChannelStreamRequest_UserMessage_NewUserMessage) Reset

func (*ChannelStreamRequest_UserMessage_NewUserMessage) String

type ChannelStreamRequest_UserMessage_NewUserMsg

type ChannelStreamRequest_UserMessage_NewUserMsg struct {
	NewUserMsg *ChannelStreamRequest_UserMessage_NewUserMessage `protobuf:"bytes,1,opt,name=new_user_msg,json=newUserMsg,proto3,oneof"`
}

type ChannelStreamRequest_UserMsg

type ChannelStreamRequest_UserMsg struct {
	UserMsg *ChannelStreamRequest_UserMessage `protobuf:"bytes,2,opt,name=user_msg,json=userMsg,proto3,oneof"`
}

type ChannelStreamResponse

type ChannelStreamResponse struct {

	// Types that are assignable to Msg:
	//	*ChannelStreamResponse_UserMsg
	//	*ChannelStreamResponse_ConfigMsg
	Msg isChannelStreamResponse_Msg `protobuf_oneof:"msg"`
	// contains filtered or unexported fields
}

Stream response for bidirectional streaming of user and config messages with a single channel.

func (*ChannelStreamResponse) Descriptor deprecated

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

Deprecated: Use ChannelStreamResponse.ProtoReflect.Descriptor instead.

func (*ChannelStreamResponse) GetConfigMsg

func (x *ChannelStreamResponse) GetConfigMsg() *ChannelConfigMessage

func (*ChannelStreamResponse) GetMsg

func (m *ChannelStreamResponse) GetMsg() isChannelStreamResponse_Msg

func (*ChannelStreamResponse) GetUserMsg

func (*ChannelStreamResponse) ProtoMessage

func (*ChannelStreamResponse) ProtoMessage()

func (*ChannelStreamResponse) ProtoReflect

func (x *ChannelStreamResponse) ProtoReflect() protoreflect.Message

func (*ChannelStreamResponse) Reset

func (x *ChannelStreamResponse) Reset()

func (*ChannelStreamResponse) String

func (x *ChannelStreamResponse) String() string

type ChannelStreamResponse_ConfigMsg

type ChannelStreamResponse_ConfigMsg struct {
	ConfigMsg *ChannelConfigMessage `protobuf:"bytes,2,opt,name=config_msg,json=configMsg,proto3,oneof"`
}

type ChannelStreamResponse_UserMessage

type ChannelStreamResponse_UserMessage struct {
	MessageId uint64 `protobuf:"fixed64,1,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"`
	// Types that are assignable to UserMsg:
	//	*ChannelStreamResponse_UserMessage_NewAndUpdateUserMsg
	//	*ChannelStreamResponse_UserMessage_DeleteUserMsg
	UserMsg isChannelStreamResponse_UserMessage_UserMsg `protobuf_oneof:"user_msg"`
	// contains filtered or unexported fields
}

func (*ChannelStreamResponse_UserMessage) Descriptor deprecated

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

Deprecated: Use ChannelStreamResponse_UserMessage.ProtoReflect.Descriptor instead.

func (*ChannelStreamResponse_UserMessage) GetDeleteUserMsg

func (*ChannelStreamResponse_UserMessage) GetMessageId

func (x *ChannelStreamResponse_UserMessage) GetMessageId() uint64

func (*ChannelStreamResponse_UserMessage) GetNewAndUpdateUserMsg

func (*ChannelStreamResponse_UserMessage) GetUserMsg

func (m *ChannelStreamResponse_UserMessage) GetUserMsg() isChannelStreamResponse_UserMessage_UserMsg

func (*ChannelStreamResponse_UserMessage) ProtoMessage

func (*ChannelStreamResponse_UserMessage) ProtoMessage()

func (*ChannelStreamResponse_UserMessage) ProtoReflect

func (*ChannelStreamResponse_UserMessage) Reset

func (*ChannelStreamResponse_UserMessage) String

type ChannelStreamResponse_UserMessage_DeleteUserMessage

type ChannelStreamResponse_UserMessage_DeleteUserMessage struct {
	// contains filtered or unexported fields
}

func (*ChannelStreamResponse_UserMessage_DeleteUserMessage) Descriptor deprecated

Deprecated: Use ChannelStreamResponse_UserMessage_DeleteUserMessage.ProtoReflect.Descriptor instead.

func (*ChannelStreamResponse_UserMessage_DeleteUserMessage) ProtoMessage

func (*ChannelStreamResponse_UserMessage_DeleteUserMessage) ProtoReflect

func (*ChannelStreamResponse_UserMessage_DeleteUserMessage) Reset

func (*ChannelStreamResponse_UserMessage_DeleteUserMessage) String

type ChannelStreamResponse_UserMessage_DeleteUserMsg

type ChannelStreamResponse_UserMessage_DeleteUserMsg struct {
	DeleteUserMsg *ChannelStreamResponse_UserMessage_DeleteUserMessage `protobuf:"bytes,3,opt,name=delete_user_msg,json=deleteUserMsg,proto3,oneof"`
}

type ChannelStreamResponse_UserMessage_NewAndUpdateUserMessage

type ChannelStreamResponse_UserMessage_NewAndUpdateUserMessage struct {
	Timestamp *timestamp.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Content   string               `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

func (*ChannelStreamResponse_UserMessage_NewAndUpdateUserMessage) Descriptor deprecated

Deprecated: Use ChannelStreamResponse_UserMessage_NewAndUpdateUserMessage.ProtoReflect.Descriptor instead.

func (*ChannelStreamResponse_UserMessage_NewAndUpdateUserMessage) GetContent

func (*ChannelStreamResponse_UserMessage_NewAndUpdateUserMessage) GetTimestamp

func (*ChannelStreamResponse_UserMessage_NewAndUpdateUserMessage) ProtoMessage

func (*ChannelStreamResponse_UserMessage_NewAndUpdateUserMessage) ProtoReflect

func (*ChannelStreamResponse_UserMessage_NewAndUpdateUserMessage) Reset

func (*ChannelStreamResponse_UserMessage_NewAndUpdateUserMessage) String

type ChannelStreamResponse_UserMessage_NewAndUpdateUserMsg

type ChannelStreamResponse_UserMessage_NewAndUpdateUserMsg struct {
	NewAndUpdateUserMsg *ChannelStreamResponse_UserMessage_NewAndUpdateUserMessage `protobuf:"bytes,2,opt,name=new_and_update_user_msg,json=newAndUpdateUserMsg,proto3,oneof"`
}

type ChannelStreamResponse_UserMsg

type ChannelStreamResponse_UserMsg struct {
	UserMsg *ChannelStreamResponse_UserMessage `protobuf:"bytes,1,opt,name=user_msg,json=userMsg,proto3,oneof"`
}

type ChatClient

type ChatClient interface {
	AddChannel(ctx context.Context, in *AddChannelRequest, opts ...grpc.CallOption) (*AddChannelResponse, error)
	RemoveChannel(ctx context.Context, in *RemoveChannelRequest, opts ...grpc.CallOption) (*RemoveChannelResponse, error)
	GetChannels(ctx context.Context, in *GetChannelsRequest, opts ...grpc.CallOption) (*GetChannelsResponse, error)
	GetChannel(ctx context.Context, in *GetChannelRequest, opts ...grpc.CallOption) (*GetChannelResponse, error)
	// Bidirectional stream of user and channel configuration messages
	// with a single channel.
	// NOTE: the fields and nested messages were designed with a single
	// channel in mind. So while it may be possible to use this RPC to
	// stream with multiple channels simultaneously, no adequate result
	// should be expected. Thus, it is developer's responsibility to make
	// sure that separate Stream RPCs are invoked for each channel.
	ChannelStream(ctx context.Context, opts ...grpc.CallOption) (Chat_ChannelStreamClient, error)
}

ChatClient is the client API for Chat service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewChatClient

func NewChatClient(cc grpc.ClientConnInterface) ChatClient

type ChatServer

type ChatServer interface {
	AddChannel(context.Context, *AddChannelRequest) (*AddChannelResponse, error)
	RemoveChannel(context.Context, *RemoveChannelRequest) (*RemoveChannelResponse, error)
	GetChannels(context.Context, *GetChannelsRequest) (*GetChannelsResponse, error)
	GetChannel(context.Context, *GetChannelRequest) (*GetChannelResponse, error)
	// Bidirectional stream of user and channel configuration messages
	// with a single channel.
	// NOTE: the fields and nested messages were designed with a single
	// channel in mind. So while it may be possible to use this RPC to
	// stream with multiple channels simultaneously, no adequate result
	// should be expected. Thus, it is developer's responsibility to make
	// sure that separate Stream RPCs are invoked for each channel.
	ChannelStream(Chat_ChannelStreamServer) error
}

ChatServer is the server API for Chat service.

type Chat_ChannelStreamClient

type Chat_ChannelStreamClient interface {
	Send(*ChannelStreamRequest) error
	Recv() (*ChannelStreamResponse, error)
	grpc.ClientStream
}

type Chat_ChannelStreamServer

type Chat_ChannelStreamServer interface {
	Send(*ChannelStreamResponse) error
	Recv() (*ChannelStreamRequest, error)
	grpc.ServerStream
}

type CreateUserRequest

type CreateUserRequest struct {
	Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"`
	Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateUserRequest) Descriptor deprecated

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

Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead.

func (*CreateUserRequest) GetPassword

func (x *CreateUserRequest) GetPassword() string

func (*CreateUserRequest) GetUsername

func (x *CreateUserRequest) GetUsername() string

func (*CreateUserRequest) ProtoMessage

func (*CreateUserRequest) ProtoMessage()

func (*CreateUserRequest) ProtoReflect

func (x *CreateUserRequest) ProtoReflect() protoreflect.Message

func (*CreateUserRequest) Reset

func (x *CreateUserRequest) Reset()

func (*CreateUserRequest) String

func (x *CreateUserRequest) String() string

type CreateUserResponse

type CreateUserResponse struct {
	// contains filtered or unexported fields
}

func (*CreateUserResponse) Descriptor deprecated

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

Deprecated: Use CreateUserResponse.ProtoReflect.Descriptor instead.

func (*CreateUserResponse) ProtoMessage

func (*CreateUserResponse) ProtoMessage()

func (*CreateUserResponse) ProtoReflect

func (x *CreateUserResponse) ProtoReflect() protoreflect.Message

func (*CreateUserResponse) Reset

func (x *CreateUserResponse) Reset()

func (*CreateUserResponse) String

func (x *CreateUserResponse) String() string

type GetChannelRequest

type GetChannelRequest struct {
	ChannelId uint64 `protobuf:"fixed64,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetChannelRequest) Descriptor deprecated

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

Deprecated: Use GetChannelRequest.ProtoReflect.Descriptor instead.

func (*GetChannelRequest) GetChannelId

func (x *GetChannelRequest) GetChannelId() uint64

func (*GetChannelRequest) ProtoMessage

func (*GetChannelRequest) ProtoMessage()

func (*GetChannelRequest) ProtoReflect

func (x *GetChannelRequest) ProtoReflect() protoreflect.Message

func (*GetChannelRequest) Reset

func (x *GetChannelRequest) Reset()

func (*GetChannelRequest) String

func (x *GetChannelRequest) String() string

type GetChannelResponse

type GetChannelResponse struct {
	Channel *GetChannelResponse_ChannelInfo `protobuf:"bytes,1,opt,name=channel,proto3" json:"channel,omitempty"`
	// contains filtered or unexported fields
}

func (*GetChannelResponse) Descriptor deprecated

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

Deprecated: Use GetChannelResponse.ProtoReflect.Descriptor instead.

func (*GetChannelResponse) GetChannel

func (*GetChannelResponse) ProtoMessage

func (*GetChannelResponse) ProtoMessage()

func (*GetChannelResponse) ProtoReflect

func (x *GetChannelResponse) ProtoReflect() protoreflect.Message

func (*GetChannelResponse) Reset

func (x *GetChannelResponse) Reset()

func (*GetChannelResponse) String

func (x *GetChannelResponse) String() string

type GetChannelResponse_ChannelInfo

type GetChannelResponse_ChannelInfo struct {
	ChannelId   uint64                              `protobuf:"fixed64,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
	Name        string                              `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Users       map[string]*GetChannelResponse_User `` /* 151-byte string literal not displayed */
	PinnedMsgId uint64                              `protobuf:"varint,4,opt,name=pinned_msg_id,json=pinnedMsgId,proto3" json:"pinned_msg_id,omitempty"`
	IsPublic    bool                                `protobuf:"varint,5,opt,name=is_public,json=isPublic,proto3" json:"is_public,omitempty"`
	// contains filtered or unexported fields
}

func (*GetChannelResponse_ChannelInfo) Descriptor deprecated

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

Deprecated: Use GetChannelResponse_ChannelInfo.ProtoReflect.Descriptor instead.

func (*GetChannelResponse_ChannelInfo) GetChannelId

func (x *GetChannelResponse_ChannelInfo) GetChannelId() uint64

func (*GetChannelResponse_ChannelInfo) GetIsPublic

func (x *GetChannelResponse_ChannelInfo) GetIsPublic() bool

func (*GetChannelResponse_ChannelInfo) GetName

func (*GetChannelResponse_ChannelInfo) GetPinnedMsgId

func (x *GetChannelResponse_ChannelInfo) GetPinnedMsgId() uint64

func (*GetChannelResponse_ChannelInfo) GetUsers

func (*GetChannelResponse_ChannelInfo) ProtoMessage

func (*GetChannelResponse_ChannelInfo) ProtoMessage()

func (*GetChannelResponse_ChannelInfo) ProtoReflect

func (*GetChannelResponse_ChannelInfo) Reset

func (x *GetChannelResponse_ChannelInfo) Reset()

func (*GetChannelResponse_ChannelInfo) String

type GetChannelResponse_User

type GetChannelResponse_User struct {
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Role     int32  `protobuf:"varint,2,opt,name=role,proto3" json:"role,omitempty"`
	// contains filtered or unexported fields
}

func (*GetChannelResponse_User) Descriptor deprecated

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

Deprecated: Use GetChannelResponse_User.ProtoReflect.Descriptor instead.

func (*GetChannelResponse_User) GetRole

func (x *GetChannelResponse_User) GetRole() int32

func (*GetChannelResponse_User) GetUsername

func (x *GetChannelResponse_User) GetUsername() string

func (*GetChannelResponse_User) ProtoMessage

func (*GetChannelResponse_User) ProtoMessage()

func (*GetChannelResponse_User) ProtoReflect

func (x *GetChannelResponse_User) ProtoReflect() protoreflect.Message

func (*GetChannelResponse_User) Reset

func (x *GetChannelResponse_User) Reset()

func (*GetChannelResponse_User) String

func (x *GetChannelResponse_User) String() string

type GetChannelsRequest

type GetChannelsRequest struct {
	// contains filtered or unexported fields
}

func (*GetChannelsRequest) Descriptor deprecated

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

Deprecated: Use GetChannelsRequest.ProtoReflect.Descriptor instead.

func (*GetChannelsRequest) ProtoMessage

func (*GetChannelsRequest) ProtoMessage()

func (*GetChannelsRequest) ProtoReflect

func (x *GetChannelsRequest) ProtoReflect() protoreflect.Message

func (*GetChannelsRequest) Reset

func (x *GetChannelsRequest) Reset()

func (*GetChannelsRequest) String

func (x *GetChannelsRequest) String() string

type GetChannelsResponse

type GetChannelsResponse struct {
	ChannelMetas map[uint64]*GetChannelsResponse_ChannelMeta `` /* 187-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*GetChannelsResponse) Descriptor deprecated

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

Deprecated: Use GetChannelsResponse.ProtoReflect.Descriptor instead.

func (*GetChannelsResponse) GetChannelMetas

func (*GetChannelsResponse) ProtoMessage

func (*GetChannelsResponse) ProtoMessage()

func (*GetChannelsResponse) ProtoReflect

func (x *GetChannelsResponse) ProtoReflect() protoreflect.Message

func (*GetChannelsResponse) Reset

func (x *GetChannelsResponse) Reset()

func (*GetChannelsResponse) String

func (x *GetChannelsResponse) String() string

type GetChannelsResponse_ChannelMeta

type GetChannelsResponse_ChannelMeta struct {
	Name         string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	IsPublic     bool   `protobuf:"varint,3,opt,name=is_public,json=isPublic,proto3" json:"is_public,omitempty"`
	MembersCount int32  `protobuf:"varint,4,opt,name=members_count,json=membersCount,proto3" json:"members_count,omitempty"`
	// contains filtered or unexported fields
}

func (*GetChannelsResponse_ChannelMeta) Descriptor deprecated

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

Deprecated: Use GetChannelsResponse_ChannelMeta.ProtoReflect.Descriptor instead.

func (*GetChannelsResponse_ChannelMeta) GetIsPublic

func (x *GetChannelsResponse_ChannelMeta) GetIsPublic() bool

func (*GetChannelsResponse_ChannelMeta) GetMembersCount

func (x *GetChannelsResponse_ChannelMeta) GetMembersCount() int32

func (*GetChannelsResponse_ChannelMeta) GetName

func (*GetChannelsResponse_ChannelMeta) ProtoMessage

func (*GetChannelsResponse_ChannelMeta) ProtoMessage()

func (*GetChannelsResponse_ChannelMeta) ProtoReflect

func (*GetChannelsResponse_ChannelMeta) Reset

func (*GetChannelsResponse_ChannelMeta) String

type LoginRequest

type LoginRequest struct {
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginRequest) Descriptor deprecated

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

Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.

func (*LoginRequest) GetPassword

func (x *LoginRequest) GetPassword() string

func (*LoginRequest) GetUsername

func (x *LoginRequest) GetUsername() string

func (*LoginRequest) ProtoMessage

func (*LoginRequest) ProtoMessage()

func (*LoginRequest) ProtoReflect

func (x *LoginRequest) ProtoReflect() protoreflect.Message

func (*LoginRequest) Reset

func (x *LoginRequest) Reset()

func (*LoginRequest) String

func (x *LoginRequest) String() string

type LoginResponse

type LoginResponse struct {
	AccessToken string `protobuf:"bytes,1,opt,name=accessToken,proto3" json:"accessToken,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginResponse) Descriptor deprecated

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

Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.

func (*LoginResponse) GetAccessToken

func (x *LoginResponse) GetAccessToken() string

func (*LoginResponse) ProtoMessage

func (*LoginResponse) ProtoMessage()

func (*LoginResponse) ProtoReflect

func (x *LoginResponse) ProtoReflect() protoreflect.Message

func (*LoginResponse) Reset

func (x *LoginResponse) Reset()

func (*LoginResponse) String

func (x *LoginResponse) String() string

type LogoutRequest

type LogoutRequest struct {
	AccessToken string `protobuf:"bytes,1,opt,name=accessToken,proto3" json:"accessToken,omitempty"`
	// contains filtered or unexported fields
}

func (*LogoutRequest) Descriptor deprecated

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

Deprecated: Use LogoutRequest.ProtoReflect.Descriptor instead.

func (*LogoutRequest) GetAccessToken

func (x *LogoutRequest) GetAccessToken() string

func (*LogoutRequest) ProtoMessage

func (*LogoutRequest) ProtoMessage()

func (*LogoutRequest) ProtoReflect

func (x *LogoutRequest) ProtoReflect() protoreflect.Message

func (*LogoutRequest) Reset

func (x *LogoutRequest) Reset()

func (*LogoutRequest) String

func (x *LogoutRequest) String() string

type LogoutResponse

type LogoutResponse struct {
	// contains filtered or unexported fields
}

func (*LogoutResponse) Descriptor deprecated

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

Deprecated: Use LogoutResponse.ProtoReflect.Descriptor instead.

func (*LogoutResponse) ProtoMessage

func (*LogoutResponse) ProtoMessage()

func (*LogoutResponse) ProtoReflect

func (x *LogoutResponse) ProtoReflect() protoreflect.Message

func (*LogoutResponse) Reset

func (x *LogoutResponse) Reset()

func (*LogoutResponse) String

func (x *LogoutResponse) String() string

type Permission

type Permission int32

represents permissions within a single channel.

const (
	// default permission in case api user leaves this field empty
	Permission_UNKNOWN_PERMISSION Permission = 0
	// permission to read for subscribed users or any member of the channel
	Permission_READ Permission = 1
	// includes writing, modifying, and deletion of own messages
	Permission_WRITE Permission = 2
	// allows deleting othes users' messages
	Permission_DELETE Permission = 3
	// allows to modify channel configurations
	Permission_MODIFY Permission = 4
	// for kicking users out of the channel
	Permission_KICK Permission = 5
	// for banning users
	Permission_BAN Permission = 6
	// assignment of roles all channel's users
	Permission_ASSIGN_ROLE Permission = 7
	// permanently removing the channel and all its data
	Permission_REMOVE_CHANNEL Permission = 8
)

func (Permission) Descriptor

func (Permission) Descriptor() protoreflect.EnumDescriptor

func (Permission) Enum

func (x Permission) Enum() *Permission

func (Permission) EnumDescriptor deprecated

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

Deprecated: Use Permission.Descriptor instead.

func (Permission) Number

func (x Permission) Number() protoreflect.EnumNumber

func (Permission) String

func (x Permission) String() string

func (Permission) Type

type RemoveChannelRequest

type RemoveChannelRequest struct {
	ChannelId uint64 `protobuf:"fixed64,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
	// contains filtered or unexported fields
}

func (*RemoveChannelRequest) Descriptor deprecated

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

Deprecated: Use RemoveChannelRequest.ProtoReflect.Descriptor instead.

func (*RemoveChannelRequest) GetChannelId

func (x *RemoveChannelRequest) GetChannelId() uint64

func (*RemoveChannelRequest) ProtoMessage

func (*RemoveChannelRequest) ProtoMessage()

func (*RemoveChannelRequest) ProtoReflect

func (x *RemoveChannelRequest) ProtoReflect() protoreflect.Message

func (*RemoveChannelRequest) Reset

func (x *RemoveChannelRequest) Reset()

func (*RemoveChannelRequest) String

func (x *RemoveChannelRequest) String() string

type RemoveChannelResponse

type RemoveChannelResponse struct {
	// contains filtered or unexported fields
}

func (*RemoveChannelResponse) Descriptor deprecated

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

Deprecated: Use RemoveChannelResponse.ProtoReflect.Descriptor instead.

func (*RemoveChannelResponse) ProtoMessage

func (*RemoveChannelResponse) ProtoMessage()

func (*RemoveChannelResponse) ProtoReflect

func (x *RemoveChannelResponse) ProtoReflect() protoreflect.Message

func (*RemoveChannelResponse) Reset

func (x *RemoveChannelResponse) Reset()

func (*RemoveChannelResponse) String

func (x *RemoveChannelResponse) String() string

type Role

type Role int32

represents roles within a single channel, each role may have one or more permissions.

const (
	// default role in case api user leaves this field empty
	Role_UNKNOWN_ROLE Role = 0
	// people who subscribed for reading messages from channel, but who
	// cannot write messages or do anything else
	Role_SUBSCRIBER Role = 1
	// users who can read and write messages to the channel
	Role_MEMBER Role = 2
	// admins can delete others' messages and kick users out of channel
	Role_ADMIN Role = 3
	// superadmins, in addition to admins' permissions, can modify channel
	// configs, ban users, and remove the channel. They can also assign roles
	// to others. In case custom roles are added, they can customize them.
	Role_SUPERADMIN Role = 4
)

func (Role) Descriptor

func (Role) Descriptor() protoreflect.EnumDescriptor

func (Role) Enum

func (x Role) Enum() *Role

func (Role) EnumDescriptor deprecated

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

Deprecated: Use Role.Descriptor instead.

func (Role) Number

func (x Role) Number() protoreflect.EnumNumber

func (Role) String

func (x Role) String() string

func (Role) Type

func (Role) Type() protoreflect.EnumType

type UnimplementedAuthServiceServer

type UnimplementedAuthServiceServer struct {
}

UnimplementedAuthServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedAuthServiceServer) CreateUser

func (*UnimplementedAuthServiceServer) Login

func (*UnimplementedAuthServiceServer) Logout

type UnimplementedChatServer

type UnimplementedChatServer struct {
}

UnimplementedChatServer can be embedded to have forward compatible implementations.

func (*UnimplementedChatServer) AddChannel

func (*UnimplementedChatServer) ChannelStream

func (*UnimplementedChatServer) GetChannel

func (*UnimplementedChatServer) GetChannels

func (*UnimplementedChatServer) RemoveChannel

Jump to

Keyboard shortcuts

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