action

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SecretKey = "321321"
	BaseURL   = "http://%s:%d/GoCMD?%s"
)
View Source
const (
	CloseType
	KickType
	HotType
	SaveType
)
View Source
const (
	BaseActionType = iota
)

Variables

This section is empty.

Functions

func Md5

func Md5(str string) string

Types

type Action

type Action interface {
	GetName() string
	GetType() int
	GetAction(action string) (Action, error)
	InitFlags(flags *flags.Flags)
	CheckParams() error
	JoinPayload() *strings.Reader
	JoinUrl() (string, string)
}

type Actions

type Actions []Action

func (Actions) CheckParams

func (c Actions) CheckParams() error

func (Actions) GetAction

func (c Actions) GetAction(action string) (Action, error)

func (Actions) GetName

func (c Actions) GetName() string

func (Actions) GetType

func (c Actions) GetType() int

func (Actions) InitFlags

func (c Actions) InitFlags(flags *flags.Flags)

func (Actions) JoinPayload

func (c Actions) JoinPayload() *strings.Reader

func (Actions) JoinUrl

func (c Actions) JoinUrl() (string, string)

type BaseAction

type BaseAction struct {
	Name     string
	Host     string
	Port     int
	ServerID int
}

func (*BaseAction) CheckParams

func (c *BaseAction) CheckParams() error

func (*BaseAction) GetAction

func (c *BaseAction) GetAction(action string) (Action, error)

func (*BaseAction) GetName

func (c *BaseAction) GetName() string

func (*BaseAction) GetType

func (c *BaseAction) GetType() int

func (*BaseAction) InitFlags

func (c *BaseAction) InitFlags(flags *flags.Flags)

func (*BaseAction) JoinPayload

func (c *BaseAction) JoinPayload() *strings.Reader

func (*BaseAction) JoinUrl

func (c *BaseAction) JoinUrl() (string, string)

Jump to

Keyboard shortcuts

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