command

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangePassword

type ChangePassword struct {
	UserID          iggcon.Identifier `json:"-"`
	CurrentPassword string            `json:"CurrentPassword"`
	NewPassword     string            `json:"NewPassword"`
}

func (*ChangePassword) Code

func (c *ChangePassword) Code() Code

func (*ChangePassword) MarshalBinary

func (c *ChangePassword) MarshalBinary() ([]byte, error)

type Code

type Code int
const (
	PingCode                 Code = 1
	GetStatsCode             Code = 10
	GetSnapshotFileCode      Code = 11
	GetClusterMetadataCode   Code = 12
	GetMeCode                Code = 20
	GetClientCode            Code = 21
	GetClientsCode           Code = 22
	GetUserCode              Code = 31
	GetUsersCode             Code = 32
	CreateUserCode           Code = 33
	DeleteUserCode           Code = 34
	UpdateUserCode           Code = 35
	UpdatePermissionsCode    Code = 36
	ChangePasswordCode       Code = 37
	LoginUserCode            Code = 38
	LogoutUserCode           Code = 39
	GetAccessTokensCode      Code = 41
	CreateAccessTokenCode    Code = 42
	DeleteAccessTokenCode    Code = 43
	LoginWithAccessTokenCode Code = 44
	PollMessagesCode         Code = 100
	SendMessagesCode         Code = 101
	GetOffsetCode            Code = 120
	StoreOffsetCode          Code = 121
	DeleteConsumerOffsetCode Code = 122
	GetStreamCode            Code = 200
	GetStreamsCode           Code = 201
	CreateStreamCode         Code = 202
	DeleteStreamCode         Code = 203
	UpdateStreamCode         Code = 204
	GetTopicCode             Code = 300
	GetTopicsCode            Code = 301
	CreateTopicCode          Code = 302
	DeleteTopicCode          Code = 303
	UpdateTopicCode          Code = 304
	CreatePartitionsCode     Code = 402
	DeletePartitionsCode     Code = 403
	GetGroupCode             Code = 600
	GetGroupsCode            Code = 601
	CreateGroupCode          Code = 602
	DeleteGroupCode          Code = 603
	JoinGroupCode            Code = 604
	LeaveGroupCode           Code = 605
)

type Command

type Command interface {
	// Code returns the command code associated with this command.
	Code() Code

	encoding.BinaryMarshaler
}

type CreateConsumerGroup

type CreateConsumerGroup struct {
	TopicPath
	Name string
}

func (*CreateConsumerGroup) Code

func (c *CreateConsumerGroup) Code() Code

func (*CreateConsumerGroup) MarshalBinary

func (c *CreateConsumerGroup) MarshalBinary() ([]byte, error)

type CreatePartitions

type CreatePartitions struct {
	StreamId        iggcon.Identifier `json:"streamId"`
	TopicId         iggcon.Identifier `json:"topicId"`
	PartitionsCount uint32            `json:"partitionsCount"`
}

func (*CreatePartitions) Code

func (c *CreatePartitions) Code() Code

func (*CreatePartitions) MarshalBinary

func (c *CreatePartitions) MarshalBinary() ([]byte, error)

type CreatePersonalAccessToken

type CreatePersonalAccessToken struct {
	Name   string `json:"Name"`
	Expiry uint32 `json:"Expiry"`
}

func (*CreatePersonalAccessToken) Code

func (c *CreatePersonalAccessToken) Code() Code

func (*CreatePersonalAccessToken) MarshalBinary

func (c *CreatePersonalAccessToken) MarshalBinary() ([]byte, error)

type CreateStream

type CreateStream struct {
	Name string
}

func (*CreateStream) Code

func (request *CreateStream) Code() Code

func (*CreateStream) MarshalBinary

func (request *CreateStream) MarshalBinary() ([]byte, error)

type CreateTopic

type CreateTopic struct {
	StreamId             iggcon.Identifier           `json:"streamId"`
	PartitionsCount      uint32                      `json:"partitionsCount"`
	CompressionAlgorithm iggcon.CompressionAlgorithm `json:"compressionAlgorithm"`
	MessageExpiry        iggcon.Duration             `json:"messageExpiry"`
	MaxTopicSize         uint64                      `json:"maxTopicSize"`
	Name                 string                      `json:"name"`
	ReplicationFactor    *uint8                      `json:"replicationFactor"`
}

func (*CreateTopic) Code

func (t *CreateTopic) Code() Code

func (*CreateTopic) MarshalBinary

func (t *CreateTopic) MarshalBinary() ([]byte, error)

type CreateUser

type CreateUser struct {
	Username    string              `json:"username"`
	Password    string              `json:"Password"`
	Status      iggcon.UserStatus   `json:"Status"`
	Permissions *iggcon.Permissions `json:"Permissions,omitempty"`
}

func (*CreateUser) Code

func (c *CreateUser) Code() Code

func (*CreateUser) MarshalBinary

func (c *CreateUser) MarshalBinary() ([]byte, error)

type DeleteConsumerGroup

type DeleteConsumerGroup struct {
	TopicPath
	GroupId iggcon.Identifier
}

func (*DeleteConsumerGroup) Code

func (d *DeleteConsumerGroup) Code() Code

func (*DeleteConsumerGroup) MarshalBinary

func (d *DeleteConsumerGroup) MarshalBinary() ([]byte, error)

type DeleteConsumerOffset

type DeleteConsumerOffset struct {
	Consumer    iggcon.Consumer
	StreamId    iggcon.Identifier
	TopicId     iggcon.Identifier
	PartitionId *uint32
}

func (*DeleteConsumerOffset) Code

func (d *DeleteConsumerOffset) Code() Code

func (*DeleteConsumerOffset) MarshalBinary

func (d *DeleteConsumerOffset) MarshalBinary() ([]byte, error)

type DeletePartitions

type DeletePartitions struct {
	StreamId        iggcon.Identifier `json:"streamId"`
	TopicId         iggcon.Identifier `json:"topicId"`
	PartitionsCount uint32            `json:"partitionsCount"`
}

func (*DeletePartitions) Code

func (d *DeletePartitions) Code() Code

func (*DeletePartitions) MarshalBinary

func (d *DeletePartitions) MarshalBinary() ([]byte, error)

type DeletePersonalAccessToken

type DeletePersonalAccessToken struct {
	Name string `json:"Name"`
}

func (*DeletePersonalAccessToken) Code

func (d *DeletePersonalAccessToken) Code() Code

func (*DeletePersonalAccessToken) MarshalBinary

func (d *DeletePersonalAccessToken) MarshalBinary() ([]byte, error)

type DeleteStream

type DeleteStream struct {
	StreamId iggcon.Identifier
}

func (*DeleteStream) Code

func (d *DeleteStream) Code() Code

func (*DeleteStream) MarshalBinary

func (d *DeleteStream) MarshalBinary() ([]byte, error)

type DeleteTopic

type DeleteTopic struct {
	StreamId iggcon.Identifier
	TopicId  iggcon.Identifier
}

func (*DeleteTopic) Code

func (d *DeleteTopic) Code() Code

func (*DeleteTopic) MarshalBinary

func (d *DeleteTopic) MarshalBinary() ([]byte, error)

type DeleteUser

type DeleteUser struct {
	Id iggcon.Identifier
}

func (*DeleteUser) Code

func (d *DeleteUser) Code() Code

func (*DeleteUser) MarshalBinary

func (d *DeleteUser) MarshalBinary() ([]byte, error)

type GetClient

type GetClient struct {
	ClientID uint32
}

func (*GetClient) Code

func (c *GetClient) Code() Code

func (*GetClient) MarshalBinary

func (c *GetClient) MarshalBinary() ([]byte, error)

type GetClients

type GetClients struct{}

func (*GetClients) Code

func (c *GetClients) Code() Code

func (*GetClients) MarshalBinary

func (c *GetClients) MarshalBinary() ([]byte, error)

type GetClusterMetadata

type GetClusterMetadata struct {
}

func (*GetClusterMetadata) Code

func (m *GetClusterMetadata) Code() Code

func (*GetClusterMetadata) MarshalBinary

func (m *GetClusterMetadata) MarshalBinary() ([]byte, error)

type GetConsumerGroup

type GetConsumerGroup struct {
	TopicPath
	GroupId iggcon.Identifier
}

func (*GetConsumerGroup) Code

func (g *GetConsumerGroup) Code() Code

func (*GetConsumerGroup) MarshalBinary

func (g *GetConsumerGroup) MarshalBinary() ([]byte, error)

type GetConsumerGroups

type GetConsumerGroups struct {
	StreamId iggcon.Identifier
	TopicId  iggcon.Identifier
}

func (*GetConsumerGroups) Code

func (g *GetConsumerGroups) Code() Code

func (*GetConsumerGroups) MarshalBinary

func (g *GetConsumerGroups) MarshalBinary() ([]byte, error)

type GetConsumerOffset

type GetConsumerOffset struct {
	StreamId    iggcon.Identifier `json:"streamId"`
	TopicId     iggcon.Identifier `json:"topicId"`
	Consumer    iggcon.Consumer   `json:"consumer"`
	PartitionId *uint32           `json:"partitionId"`
}

func (*GetConsumerOffset) Code

func (g *GetConsumerOffset) Code() Code

func (*GetConsumerOffset) MarshalBinary

func (g *GetConsumerOffset) MarshalBinary() ([]byte, error)

type GetPersonalAccessTokens

type GetPersonalAccessTokens struct{}

func (*GetPersonalAccessTokens) Code

func (g *GetPersonalAccessTokens) Code() Code

func (*GetPersonalAccessTokens) MarshalBinary

func (g *GetPersonalAccessTokens) MarshalBinary() ([]byte, error)

type GetStats

type GetStats struct{}

func (*GetStats) Code

func (c *GetStats) Code() Code

func (*GetStats) MarshalBinary

func (c *GetStats) MarshalBinary() ([]byte, error)

type GetStream

type GetStream struct {
	StreamId iggcon.Identifier
}

func (*GetStream) Code

func (g *GetStream) Code() Code

func (*GetStream) MarshalBinary

func (g *GetStream) MarshalBinary() ([]byte, error)

type GetStreams

type GetStreams struct{}

func (*GetStreams) Code

func (g *GetStreams) Code() Code

func (*GetStreams) MarshalBinary

func (g *GetStreams) MarshalBinary() ([]byte, error)

type GetTopic

type GetTopic struct {
	StreamId iggcon.Identifier
	TopicId  iggcon.Identifier
}

func (*GetTopic) Code

func (g *GetTopic) Code() Code

func (*GetTopic) MarshalBinary

func (g *GetTopic) MarshalBinary() ([]byte, error)

type GetTopics

type GetTopics struct {
	StreamId iggcon.Identifier
}

func (*GetTopics) Code

func (g *GetTopics) Code() Code

func (*GetTopics) MarshalBinary

func (g *GetTopics) MarshalBinary() ([]byte, error)

type GetUser

type GetUser struct {
	Id iggcon.Identifier
}

func (*GetUser) Code

func (c *GetUser) Code() Code

func (*GetUser) MarshalBinary

func (c *GetUser) MarshalBinary() ([]byte, error)

type GetUsers

type GetUsers struct{}

func (*GetUsers) Code

func (g *GetUsers) Code() Code

func (*GetUsers) MarshalBinary

func (g *GetUsers) MarshalBinary() ([]byte, error)

type JoinConsumerGroup

type JoinConsumerGroup struct {
	TopicPath
	GroupId iggcon.Identifier
}

func (*JoinConsumerGroup) Code

func (j *JoinConsumerGroup) Code() Code

func (*JoinConsumerGroup) MarshalBinary

func (j *JoinConsumerGroup) MarshalBinary() ([]byte, error)

type LeaveConsumerGroup

type LeaveConsumerGroup struct {
	TopicPath
	GroupId iggcon.Identifier
}

func (*LeaveConsumerGroup) Code

func (l *LeaveConsumerGroup) Code() Code

func (*LeaveConsumerGroup) MarshalBinary

func (l *LeaveConsumerGroup) MarshalBinary() ([]byte, error)

type LoginUser

type LoginUser struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

func (*LoginUser) Code

func (lu *LoginUser) Code() Code

func (*LoginUser) MarshalBinary

func (lu *LoginUser) MarshalBinary() ([]byte, error)

type LoginWithPersonalAccessToken

type LoginWithPersonalAccessToken struct {
	Token string `json:"token"`
}

func (*LoginWithPersonalAccessToken) Code

func (*LoginWithPersonalAccessToken) MarshalBinary

func (lw *LoginWithPersonalAccessToken) MarshalBinary() ([]byte, error)

type LogoutUser

type LogoutUser struct{}

func (*LogoutUser) Code

func (lu *LogoutUser) Code() Code

func (*LogoutUser) MarshalBinary

func (lu *LogoutUser) MarshalBinary() ([]byte, error)

type Ping

type Ping struct{}

func (*Ping) Code

func (p *Ping) Code() Code

func (*Ping) MarshalBinary

func (p *Ping) MarshalBinary() ([]byte, error)

type PollMessages

type PollMessages struct {
	StreamId    iggcon.Identifier      `json:"streamId"`
	TopicId     iggcon.Identifier      `json:"topicId"`
	Consumer    iggcon.Consumer        `json:"consumer"`
	PartitionId *uint32                `json:"partitionId"`
	Strategy    iggcon.PollingStrategy `json:"pollingStrategy"`
	Count       uint32                 `json:"count"`
	AutoCommit  bool                   `json:"autoCommit"`
}

func (*PollMessages) Code

func (m *PollMessages) Code() Code

func (*PollMessages) MarshalBinary

func (m *PollMessages) MarshalBinary() ([]byte, error)

type SendMessages

type SendMessages struct {
	Compression iggcon.IggyMessageCompression

	StreamId     iggcon.Identifier    `json:"streamId"`
	TopicId      iggcon.Identifier    `json:"topicId"`
	Partitioning iggcon.Partitioning  `json:"partitioning"`
	Messages     []iggcon.IggyMessage `json:"messages"`
}

func (*SendMessages) Code

func (s *SendMessages) Code() Code

func (*SendMessages) MarshalBinary

func (s *SendMessages) MarshalBinary() ([]byte, error)

type StoreConsumerOffsetRequest

type StoreConsumerOffsetRequest struct {
	StreamId    iggcon.Identifier `json:"streamId"`
	TopicId     iggcon.Identifier `json:"topicId"`
	Consumer    iggcon.Consumer   `json:"consumer"`
	PartitionId *uint32           `json:"partitionId"`
	Offset      uint64            `json:"offset"`
}

func (*StoreConsumerOffsetRequest) Code

func (s *StoreConsumerOffsetRequest) Code() Code

func (*StoreConsumerOffsetRequest) MarshalBinary

func (s *StoreConsumerOffsetRequest) MarshalBinary() ([]byte, error)

type TopicPath

type TopicPath struct {
	StreamId iggcon.Identifier
	TopicId  iggcon.Identifier
}

type UpdatePermissions

type UpdatePermissions struct {
	UserID      iggcon.Identifier   `json:"-"`
	Permissions *iggcon.Permissions `json:"Permissions,omitempty"`
}

func (*UpdatePermissions) Code

func (u *UpdatePermissions) Code() Code

func (*UpdatePermissions) MarshalBinary

func (u *UpdatePermissions) MarshalBinary() ([]byte, error)

type UpdateStream

type UpdateStream struct {
	StreamId iggcon.Identifier `json:"streamId"`
	Name     string            `json:"name"`
}

func (*UpdateStream) Code

func (u *UpdateStream) Code() Code

func (*UpdateStream) MarshalBinary

func (u *UpdateStream) MarshalBinary() ([]byte, error)

type UpdateTopic

type UpdateTopic struct {
	StreamId             iggcon.Identifier           `json:"streamId"`
	TopicId              iggcon.Identifier           `json:"topicId"`
	CompressionAlgorithm iggcon.CompressionAlgorithm `json:"compressionAlgorithm"`
	MessageExpiry        iggcon.Duration             `json:"messageExpiry"`
	MaxTopicSize         uint64                      `json:"maxTopicSize"`
	ReplicationFactor    *uint8                      `json:"replicationFactor"`
	Name                 string                      `json:"name"`
}

func (*UpdateTopic) Code

func (u *UpdateTopic) Code() Code

func (*UpdateTopic) MarshalBinary

func (u *UpdateTopic) MarshalBinary() ([]byte, error)

type UpdateUser

type UpdateUser struct {
	UserID   iggcon.Identifier  `json:"-"`
	Username *string            `json:"username"`
	Status   *iggcon.UserStatus `json:"userStatus"`
}

func (*UpdateUser) Code

func (u *UpdateUser) Code() Code

func (*UpdateUser) MarshalBinary

func (u *UpdateUser) MarshalBinary() ([]byte, error)

Jump to

Keyboard shortcuts

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