Documentation ¶
Index ¶
- Constants
- Variables
- func AuthAPI(accessToken string, g *global.Global) (*sso.User, error)
- func AuthContainer(token, appName string, g *global.Global) (*sso.User, error)
- func GetContainer(appName, procName, instanceNo string, g *global.Global) (*message.Container, error)
- func GetMarshalers(r *http.Request) (Marshaler, Unmarshaler)
- func GetSourceIP(r *http.Request) string
- func GetValidUT8Length(data []byte) int
- func GetWidthAndHeight(data []byte) (int, int)
- func SendCloseMessage(conn *websocket.Conn, content []byte, msgMarshaller Marshaler, ...)
- func SendMail(msg []byte, g *global.Global) error
- type ConsoleAuthConf
- type ConsoleAuthResponse
- type ConsoleRole
- type Marshaler
- type Unmarshaler
- type ViaMethod
Constants ¶
View Source
const (
ErrMsgTemplate = "\033[31m>>> %s\033[0m"
)
Variables ¶
Functions ¶
func AuthContainer ¶
AuthContainer authorizes whether the client with the token has the right to access the application's container
func GetContainer ¶
func GetContainer(appName, procName, instanceNo string, g *global.Global) (*message.Container, error)
GetContainer get container according to appName, procName and instanceNo
func GetMarshalers ¶
func GetMarshalers(r *http.Request) (Marshaler, Unmarshaler)
func GetSourceIP ¶
func GetValidUT8Length ¶
func GetWidthAndHeight ¶
func SendCloseMessage ¶
Types ¶
type ConsoleAuthConf ¶
type ConsoleAuthResponse ¶
type ConsoleAuthResponse struct { Message string `json:"msg"` URL string `json:"url"` Role ConsoleRole `json:"role"` }
type ConsoleRole ¶
type ConsoleRole struct {
Role string `json:"role"`
}
type Unmarshaler ¶
Click to show internal directories.
Click to hide internal directories.