cmd

package
v3.3.3-rc.1 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: Apache-2.0 Imports: 12 Imported by: 13

Documentation

Index

Constants

View Source
const (
	RpcPushServer         = "push"
	RpcAuthServer         = "auth"
	RpcConversationServer = "conversation"
	RpcFriendServer       = "friend"
	RpcGroupServer        = "group"
	RpcMsgServer          = "msg"
	RpcThirdServer        = "third"
	RpcUserServer         = "user"
)

Variables

This section is empty.

Functions

func WithCronTaskLogName

func WithCronTaskLogName() func(*CmdOpts)

func WithLogName

func WithLogName(logName string) func(*CmdOpts)

Types

type ApiCmd

type ApiCmd struct {
	*RootCmd
}

func NewApiCmd

func NewApiCmd() *ApiCmd

func (*ApiCmd) AddApi

func (a *ApiCmd) AddApi(f func(port int) error)

func (*ApiCmd) GetPortFromConfig added in v3.4.0

func (a *ApiCmd) GetPortFromConfig(portType string) int

type ClearCmd

type ClearCmd struct {
	*MsgUtilsCmd
}

func NewClearCmd

func NewClearCmd() *ClearCmd

type CmdOpts

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

type CronTaskCmd

type CronTaskCmd struct {
	*RootCmd
}

func NewCronTaskCmd

func NewCronTaskCmd() *CronTaskCmd

func (*CronTaskCmd) Exec

func (c *CronTaskCmd) Exec(f func() error) error

type FixCmd

type FixCmd struct {
	*MsgUtilsCmd
}

func NewFixCmd

func NewFixCmd() *FixCmd

type GetCmd

type GetCmd struct {
	*MsgUtilsCmd
}

func NewGetCmd

func NewGetCmd() *GetCmd

type MsgCmd

type MsgCmd struct {
	*MsgUtilsCmd
}

func NewMsgCmd

func NewMsgCmd() *MsgCmd

func (*MsgCmd) ClearMsgCmd

func (m *MsgCmd) ClearMsgCmd() *cobra.Command

func (*MsgCmd) GetMsgCmd

func (m *MsgCmd) GetMsgCmd() *cobra.Command

type MsgGatewayCmd

type MsgGatewayCmd struct {
	*RootCmd
}

func NewMsgGatewayCmd

func NewMsgGatewayCmd() *MsgGatewayCmd

func (*MsgGatewayCmd) AddWsPortFlag

func (m *MsgGatewayCmd) AddWsPortFlag()

func (*MsgGatewayCmd) Exec

func (m *MsgGatewayCmd) Exec() error

func (*MsgGatewayCmd) GetPortFromConfig added in v3.4.0

func (m *MsgGatewayCmd) GetPortFromConfig(portType string) int

type MsgTransferCmd

type MsgTransferCmd struct {
	*RootCmd
}

func NewMsgTransferCmd

func NewMsgTransferCmd() *MsgTransferCmd

func (*MsgTransferCmd) Exec

func (m *MsgTransferCmd) Exec() error

type MsgUtilsCmd

type MsgUtilsCmd struct {
	cobra.Command
}

func NewMsgUtilsCmd

func NewMsgUtilsCmd(use, short string, args cobra.PositionalArgs) *MsgUtilsCmd

func (*MsgUtilsCmd) AddBeginSeqFlag

func (m *MsgUtilsCmd) AddBeginSeqFlag()

func (*MsgUtilsCmd) AddClearAllFlag

func (m *MsgUtilsCmd) AddClearAllFlag()

func (*MsgUtilsCmd) AddFixAllFlag

func (m *MsgUtilsCmd) AddFixAllFlag()

func (*MsgUtilsCmd) AddLimitFlag

func (m *MsgUtilsCmd) AddLimitFlag()

func (*MsgUtilsCmd) AddSuperGroupIDFlag

func (m *MsgUtilsCmd) AddSuperGroupIDFlag()

func (*MsgUtilsCmd) AddUserIDFlag

func (m *MsgUtilsCmd) AddUserIDFlag()

func (*MsgUtilsCmd) Execute

func (m *MsgUtilsCmd) Execute() error

type RootCmd

type RootCmd struct {
	Command cobra.Command
	Name    string
	// contains filtered or unexported fields
}

func NewRootCmd

func NewRootCmd(name string, opts ...func(*CmdOpts)) *RootCmd

func (*RootCmd) AddCommand

func (r *RootCmd) AddCommand(cmds ...*cobra.Command)

func (*RootCmd) AddPortFlag

func (r *RootCmd) AddPortFlag()

func (*RootCmd) AddPrometheusPortFlag

func (r *RootCmd) AddPrometheusPortFlag()

func (*RootCmd) Execute

func (r *RootCmd) Execute() error

func (*RootCmd) GetPortFlag

func (r *RootCmd) GetPortFlag() int

func (*RootCmd) GetPortFromConfig added in v3.4.0

func (r *RootCmd) GetPortFromConfig(portType string) int

func (*RootCmd) GetPrometheusPortFlag

func (r *RootCmd) GetPrometheusPortFlag() int

func (*RootCmd) PortFromConfig added in v3.4.0

func (r *RootCmd) PortFromConfig(portType string) int

func (*RootCmd) SetRootCmdPt added in v3.4.0

func (r *RootCmd) SetRootCmdPt(cmdItf RootCmdPt)

type RootCmdPt added in v3.4.0

type RootCmdPt interface {
	GetPortFromConfig(portType string) int
}

type RpcCmd

type RpcCmd struct {
	*RootCmd
}

func NewRpcCmd

func NewRpcCmd(name string) *RpcCmd

func (*RpcCmd) Exec

func (a *RpcCmd) Exec() error

func (*RpcCmd) GetPortFromConfig added in v3.4.0

func (a *RpcCmd) GetPortFromConfig(portType string) int

func (*RpcCmd) StartSvr

func (a *RpcCmd) StartSvr(
	name string,
	rpcFn func(discov discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) error,
) error

type SeqCmd

type SeqCmd struct {
	*MsgUtilsCmd
}

func NewSeqCmd

func NewSeqCmd() *SeqCmd

func (*SeqCmd) FixSeqCmd

func (s *SeqCmd) FixSeqCmd() *cobra.Command

func (*SeqCmd) GetSeqCmd

func (s *SeqCmd) GetSeqCmd() *cobra.Command

Jump to

Keyboard shortcuts

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