Documentation ¶
Index ¶
- Constants
- func Call(host, url, method string, params map[string]string) (map[string]gjson.Result, error)
- func CheckServerGUID(params *GuidParams, guid string) bool
- func GetServerGUID(params *GuidParams) string
- func ServiceHandler(w http.ResponseWriter, r *http.Request)
- func StartHttpServer() error
- type Client
- type ClientParams
- type GuidParams
- type Resp
- type ServiceController
- func (s *ServiceController) AddFileAction()
- func (s *ServiceController) ConfListAction()
- func (s *ServiceController) ConfManageAction()
- func (s *ServiceController) ConfReloadAction()
- func (s *ServiceController) ConfRollbackAction()
- func (s *ServiceController) ConfStatusAction()
- func (s *ServiceController) DeleteDomainAction()
- func (s *ServiceController) DeleteFileAction()
- func (s *ServiceController) DiscoveryGetServiceAction()
- func (s *ServiceController) DiscoveryListServicesAction()
- func (s *ServiceController) DiscoverySetPropertyAction()
- func (s *ServiceController) DomainListAction()
- func (s *ServiceController) GetDomainFromConfAction()
- func (s *ServiceController) GetDomainFromDsAction()
- func (s *ServiceController) HelloWorldAction()
- func (s *ServiceController) NodeInfoAction()
- func (s *ServiceController) NodeListAction()
- func (s *ServiceController) NodeManageAction()
- func (s *ServiceController) PackageListAction()
Constants ¶
View Source
const ( MethodGet = "GET" MethodPost = "POST" DefaultClientTimeout = 5 * time.Second DefaultPartner = "server" )
View Source
const ( API_REQUEST_PARAMS_ERROR = 400 API_INTERNAL_ERROR = 500 )
View Source
const (
InnerSecretKey = "D2BsaMhN4IPnsFJ8NPIki83n2f6xdC0s"
)
Variables ¶
This section is empty.
Functions ¶
func CheckServerGUID ¶
func CheckServerGUID(params *GuidParams, guid string) bool
校验服务端的请求里的guid是否合法
func GetServerGUID ¶
func GetServerGUID(params *GuidParams) string
func ServiceHandler ¶
func ServiceHandler(w http.ResponseWriter, r *http.Request)
ServiceHandler provide routing parser
func StartHttpServer ¶
func StartHttpServer() error
Types ¶
type Client ¶
type Client struct {
Params ClientParams
}
type ClientParams ¶
type GuidParams ¶
type Resp ¶
type Resp struct { ErrorCode int `json:"error_code"` Error string `json:"error"` Data interface{} `json:"data"` }
Resp define response data
type ServiceController ¶
type ServiceController struct {
// contains filtered or unexported fields
}
ServiceController ...
func (*ServiceController) AddFileAction ¶
func (s *ServiceController) AddFileAction()
func (*ServiceController) ConfListAction ¶
func (s *ServiceController) ConfListAction()
func (*ServiceController) ConfManageAction ¶
func (s *ServiceController) ConfManageAction()
func (*ServiceController) ConfReloadAction ¶
func (s *ServiceController) ConfReloadAction()
func (*ServiceController) ConfRollbackAction ¶
func (s *ServiceController) ConfRollbackAction()
func (*ServiceController) ConfStatusAction ¶
func (s *ServiceController) ConfStatusAction()
func (*ServiceController) DeleteDomainAction ¶
func (s *ServiceController) DeleteDomainAction()
test interface
func (*ServiceController) DeleteFileAction ¶
func (s *ServiceController) DeleteFileAction()
func (*ServiceController) DiscoveryGetServiceAction ¶
func (s *ServiceController) DiscoveryGetServiceAction()
获取服务信息
func (*ServiceController) DiscoveryListServicesAction ¶
func (s *ServiceController) DiscoveryListServicesAction()
获取服务列表
func (*ServiceController) DiscoverySetPropertyAction ¶
func (s *ServiceController) DiscoverySetPropertyAction()
后台设置属性 更新metadata时,key需要以 backend-metadata- 开始,否则不生效
func (*ServiceController) DomainListAction ¶
func (s *ServiceController) DomainListAction()
func (*ServiceController) GetDomainFromConfAction ¶
func (s *ServiceController) GetDomainFromConfAction()
test interface
func (*ServiceController) GetDomainFromDsAction ¶
func (s *ServiceController) GetDomainFromDsAction()
test interface
func (*ServiceController) HelloWorldAction ¶
func (s *ServiceController) HelloWorldAction()
HelloWorldAction say i'm alive
func (*ServiceController) NodeInfoAction ¶
func (s *ServiceController) NodeInfoAction()
func (*ServiceController) NodeListAction ¶
func (s *ServiceController) NodeListAction()
func (*ServiceController) NodeManageAction ¶
func (s *ServiceController) NodeManageAction()
func (*ServiceController) PackageListAction ¶
func (s *ServiceController) PackageListAction()
Click to show internal directories.
Click to hide internal directories.