controller

package
v0.0.0-...-e0b48b5 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2017 License: MIT Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AAAAuthentication

func AAAAuthentication(rw http.ResponseWriter, req *http.Request)

POST /v1/AAA/authentication

func AAAGenerateToken

func AAAGenerateToken(rw http.ResponseWriter, req *http.Request)

GET /v1/AAA/token

func AAAValidateToken

func AAAValidateToken(id string, signature string) (bool, int64)

return the sinature is valid

func AssetCreateTemplate

func AssetCreateTemplate(rw http.ResponseWriter, req *http.Request)

func AssetSynchronize

func AssetSynchronize(rw http.ResponseWriter, req *http.Request)

func CloudAPICall

func CloudAPICall(rw http.ResponseWriter, req *http.Request)

func CloudAPICallForLoop

func CloudAPICallForLoop(in *pb.CloudAPICall, nextToken string, page, totalCount int64) (out *pb.CloudAPICall, isLoop bool)

func CloudAPICallRaw

func CloudAPICallRaw(rw http.ResponseWriter, req *http.Request)

func CloudTokenRegistry

func CloudTokenRegistry(rw http.ResponseWriter, req *http.Request)

POST /v1/cloud/token

func ConfigPull

func ConfigPull(rw http.ResponseWriter, req *http.Request)

func ConfigPush

func ConfigPush(rw http.ResponseWriter, req *http.Request)

func HookCreate

func HookCreate(rw http.ResponseWriter, req *http.Request)

func HookRecive

func HookRecive(rw http.ResponseWriter, req *http.Request)

func OrchestrationCreate

func OrchestrationCreate(rw http.ResponseWriter, req *http.Request)

func PublicCfgVersion

func PublicCfgVersion(rw http.ResponseWriter, req *http.Request)

func PublicGenerateToken

func PublicGenerateToken(rw http.ResponseWriter, req *http.Request)

func PublicValidateToken

func PublicValidateToken(k string) (bool, int64)

func ValidatePostData

func ValidatePostData(rw http.ResponseWriter, req *http.Request) ([]byte, bool)

func WechatReceiveMessage

func WechatReceiveMessage(rw http.ResponseWriter, req *http.Request)

func WechatValidateServer

func WechatValidateServer(rw http.ResponseWriter, req *http.Request)

Types

type AssetSynchronizeRequest

type AssetSynchronizeRequest struct {
	PrivateToken   AuthenticationToken `json:"token"`
	CloudTokenName string              `json:"name"`
	Region         string              `json:"region"`
}

type AssetTemplate

type AssetTemplate struct {
	PrivateToken AuthenticationToken `json:"token"`
	Name         string              `json:"name"`
	Param        map[string]string   `json:"param"`
}

type AuthenticationToken

type AuthenticationToken struct {
	Token     string `json:"token"`
	ID        string `json:"id"`
	Signature string `json:"signature"`
}

type CloudAPIRawRequest

type CloudAPIRawRequest struct {
	Token         string            `json:"token"`
	CloudTokenID  string            `json:"cloudid"`
	CloudTokenKey string            `json:"cloudkey"`
	Region        string            `json:"region"`
	Action        string            `json:"action"`
	Param         map[string]string `json:"params"`
}

type CloudAPIRequest

type CloudAPIRequest struct {
	PrivateToken   AuthenticationToken `json:"token"`
	CloudTokenName string              `json:"name"`
	Region         string              `json:"region"`
	Action         string              `json:"action"`
	Param          map[string]string   `json:"params"`
}

type CloudAPIResponse

type CloudAPIResponse struct {
	Code int64  `json:"code"`
	Msg  string `json:"msg"`
	Data string `json:"data"`
}

type OrchestrationCreateRequest

type OrchestrationCreateRequest struct {
	PrivateToken AuthenticationToken `json:"token"`
	HookName     string              `json:"hookname"`
	Project      string              `json:"project"`
	Key          string              `json:"key"`
	Value        string              `json:"value"`
	Task         []string            `json:"task"`
}

type PrivateToken

type PrivateToken struct {
	ID  string `json:"id"`
	Key string `json:"key"`
}

type PublicToken

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

type ThirdToken

type ThirdToken struct {
	PrivateToken AuthenticationToken `json:"token"`
	Cloud        string              `json:"cloud"`
	Name         string              `json:"name"`
	ID           string              `json:"id"`
	Key          string              `json:"key"`
}

type TokenRegInfo

type TokenRegInfo struct {
	Token string `json:"token"`
	Email string `json:"email"`
	Phone string `json:"phone"`
}

Jump to

Keyboard shortcuts

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