Documentation ¶
Index ¶
- Constants
- func DELETE(ctx context.Context, url, token string, body interface{}, ...) ([]byte, error)
- func GET(ctx context.Context, url, token string, body interface{}, ...) ([]byte, error)
- func POST(ctx context.Context, url, token string, body interface{}, ...) ([]byte, error)
- func PUT(ctx context.Context, url, token string, body interface{}, ...) ([]byte, error)
- type AuthCache
- type AuthDao
- type AuthToken
- type PushConfig
- type RestyClient
- func (r *RestyClient) DELETE(ctx context.Context, url, token string, body interface{}) ([]byte, error)
- func (r *RestyClient) GET(ctx context.Context, url, token string, body interface{}) ([]byte, error)
- func (r *RestyClient) POST(ctx context.Context, url, token string, body interface{}) ([]byte, error)
- func (r *RestyClient) PUT(ctx context.Context, url, token string, body interface{}) ([]byte, error)
- type StatsDao
- type UniqueId
Constants ¶
View Source
const ( AuthServerAddr = "localhost:8080" PushServerAddr = "localhost:8082" UserServerAddr = "localhost:8084" StatsServerAddr = "localhost:8086" )
View Source
const ( TestAuthToken = "" TestAuthExpireAt = 0 )
View Source
const ( TestTasks = "" TestGroup = "" TestToken = "" TestAlias = "" TestTaskId = "" TestTag = "" )
View Source
const (
GTBaseUrl = "https://restapi.getui.com/v2/%s"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthCache ¶
type AuthCache struct {
// contains filtered or unexported fields
}
func NewAuthCache ¶
type AuthDao ¶
type AuthDao struct {
// contains filtered or unexported fields
}
func NewAuthDao ¶
func NewAuthDao(conf *PushConfig) (*AuthDao, error)
type PushConfig ¶
type PushConfig struct { Mongo struct { Name string `json:"name"` Url string `json:"url"` DataBase string `json:"database"` AuthCollection string `json:"auth_collection"` StatsCollection string `json:"stats_collection"` PoolSize int `json:"pool_size"` } `json:"mongo"` GeTui struct { AgentId string `json:"agent_id"` BundleId string `json:"bundle_id"` AppId string `json:"app_id"` AppKey string `json:"app_key"` MasterSecret string `json:"master_secret"` } `json:"getui"` Apns struct { AgentId string `json:"agent_id"` BundleId string `json:"bundle_id"` Env string `json:"env"` Key string `json:"key"` KeyId string `json:"key_id"` TeamId string `json:"team_id"` } `json:"apns"` }
type RestyClient ¶
type RestyClient struct {
// contains filtered or unexported fields
}
func NewRestyClient ¶
func NewRestyClient(client *http.Client) (*RestyClient, error)
type StatsDao ¶
type StatsDao struct {
// contains filtered or unexported fields
}
func NewStatsDao ¶
func NewStatsDao(conf *PushConfig) (*StatsDao, error)
Click to show internal directories.
Click to hide internal directories.