Documentation
¶
Overview ¶
* Copyright (C) 1999-2019 Alibaba Group Holding Limited
* Copyright (C) 1999-2019 Alibaba Group Holding Limited
* Copyright (C) 1999-2019 Alibaba Group Holding Limited
* Copyright (C) 1999-2019 Alibaba Group Holding Limited
Index ¶
Constants ¶
View Source
const ( ChinaSite = SiteType("china") InternationalSite = SiteType("international") JapanSite = SiteType("japan") )
Variables ¶
This section is empty.
Functions ¶
func ReadJsonFrom ¶
func ReadYamlFrom ¶
Types ¶
type Api ¶
type Api struct { Name string `json:"name"` Protocol string `json:"protocol"` Method string `json:"method"` PathPattern string `json:"pathPattern"` Description map[string]string `json:"descriptions,omitempty"` Parameters []Parameter `json:"parameters"` Product *Product `json:"-"` }
func (*Api) CheckRequiredParameters ¶
func (*Api) FindParameter ¶
func (*Api) ForeachParameters ¶
Foreach parameter use recursion
func (*Api) GetDocumentLink ¶
func (*Api) GetProtocol ¶
type FileReader ¶
type FileReader struct { }
type InvalidEndpointError ¶
func (*InvalidEndpointError) Error ¶
func (e *InvalidEndpointError) Error() string
type Parameter ¶
type Parameter struct { Name string `json:"name"` Position string `json:"position"` Type string `json:"type"` Description map[string]string `json:"description,omitempty"` Required bool `json:"required"` Hidden bool `json:"hidden"` Example string `json:"example,omitempty"` SubParameters []Parameter `json:"sub_parameters,omitempty"` }
type ParameterSlice ¶
type ParameterSlice []Parameter
func (ParameterSlice) Len ¶
func (p ParameterSlice) Len() int
func (ParameterSlice) Less ¶
func (p ParameterSlice) Less(i, j int) bool
func (ParameterSlice) Swap ¶
func (p ParameterSlice) Swap(i, j int)
type Product ¶
type Product struct { Code string `json:"code"` Version string `json:"version"` Catalog1 map[string]string `json:"catalog1"` Catalog2 map[string]string `json:"catalog2"` Name map[string]string `json:"name"` LocationServiceCode string `json:"location_service_code"` RegionalEndpoints map[string]string `json:"regional_endpoints"` GlobalEndpoint string `json:"global_endpoint"` RegionalEndpointPattern string `json:"regional_endpoint_patterns"` ApiStyle string `json:"api_style"` ApiNames []string `json:"apis"` // contains filtered or unexported fields }
func (*Product) GetDocumentLink ¶
func (*Product) GetEndpoint ¶
func (*Product) GetLowerCode ¶
type ProductSet ¶
type ProductSet struct {
Products []Product `json:"products"`
}
type Repository ¶
type Repository struct { Products []Product Names []string // contains filtered or unexported fields }
func LoadRepository ¶
func LoadRepository(reader Reader) *Repository
func (*Repository) GetProduct ¶
func (a *Repository) GetProduct(code string) (Product, bool)
Click to show internal directories.
Click to hide internal directories.