Documentation
¶
Index ¶
- type CacheType
- type Client
- func (c *Client) GetAPIStat(apiPath string, raw bool) (int64, error)
- func (c *Client) IncAPIStat(apiPath string, raw bool) (int64, error)
- func (c *Client) QueryNamespace(fullPath string) (*models.APINamespace, error)
- func (c *Client) QueryNamespaceList(fullPath string) (*models.APINamespaceList, error)
- func (c *Client) QueryPoly(fullPath string) (*models.PolyAPIScript, error)
- func (c *Client) QueryPolyDoc(fullPath string) (*models.PolyAPIDoc, error)
- func (c *Client) QueryPolyList(fullPath string) (*models.PolyAPIList, error)
- func (c *Client) QueryRaw(fullPath string) (*models.RawAPICore, error)
- func (c *Client) QueryRawDoc(fullPath string) (*models.RawAPIDoc, error)
- func (c *Client) QueryRawList(fullPath string) (*models.RawAPIList, error)
- func (c *Client) QuerySchema(fullPath string) (*models.APISchemaFull, error)
- func (c *Client) QuerySchemaList(fullPath string) (*models.APISchemaList, error)
- func (c *Client) QueryService(fullPath string) (*models.APIService, error)
- func (c *Client) QueryServiceList(fullPath string) (*models.APIServiceList, error)
- func (c *Client) SetAPIStatKeyDuration(dur time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheType ¶
type CacheType = rediscache.CacheType
CacheType exports
const ( CacheRaw CacheType = iota + 1 CacheRawDoc CacheRawList CachePoly CachePolyDoc CachePolyList CacheNS // namespace CacheNSList // namespace list CacheService CacheServiceList CacheGateRawStat CacheGatePolyStat CacheGateIPBlack CacheGateIPWhite CacheSchema CacheSchemaList )
cache types, NEVER CHANGE THE ORDER
type Client ¶
type Client struct {
*rediscache.Client
// contains filtered or unexported fields
}
Client represend the redis client
func NewRedisClient ¶
func NewRedisClient(client *redis.ClusterClient) *Client
NewRedisClient create a redis client
func (*Client) GetAPIStat ¶
GetAPIStat GetAPIStat
func (*Client) IncAPIStat ¶
IncAPIStat IncAPIStat
func (*Client) QueryNamespace ¶
func (c *Client) QueryNamespace(fullPath string) (*models.APINamespace, error)
QueryNamespace query namespace cache by fullPath
func (*Client) QueryNamespaceList ¶
func (c *Client) QueryNamespaceList(fullPath string) (*models.APINamespaceList, error)
QueryNamespaceList query namespace list cache by fullPath
func (*Client) QueryPoly ¶
func (c *Client) QueryPoly(fullPath string) (*models.PolyAPIScript, error)
QueryPoly query poly api cache by fullPath
func (*Client) QueryPolyDoc ¶
func (c *Client) QueryPolyDoc(fullPath string) (*models.PolyAPIDoc, error)
QueryPolyDoc query poly api doc cache by fullPath
func (*Client) QueryPolyList ¶
func (c *Client) QueryPolyList(fullPath string) (*models.PolyAPIList, error)
QueryPolyList query poly api list cache by fullPath
func (*Client) QueryRaw ¶
func (c *Client) QueryRaw(fullPath string) (*models.RawAPICore, error)
QueryRaw query cache of raw api by fullPath
func (*Client) QueryRawDoc ¶
QueryRawDoc query cache of raw api doc by fullPath
func (*Client) QueryRawList ¶
func (c *Client) QueryRawList(fullPath string) (*models.RawAPIList, error)
QueryRawList query cache of raw api list by fullPath
func (*Client) QuerySchema ¶
func (c *Client) QuerySchema(fullPath string) (*models.APISchemaFull, error)
QuerySchema query schema cache by fullPath
func (*Client) QuerySchemaList ¶
func (c *Client) QuerySchemaList(fullPath string) (*models.APISchemaList, error)
QuerySchemaList query schema list cache by fullPath
func (*Client) QueryService ¶
func (c *Client) QueryService(fullPath string) (*models.APIService, error)
QueryService query service cache by fullPath
func (*Client) QueryServiceList ¶
func (c *Client) QueryServiceList(fullPath string) (*models.APIServiceList, error)
QueryServiceList query service list cache by fullPath