Documentation ¶
Index ¶
- Variables
- type Client
- func (c *Client) GetBuildingInfo(ctx context.Context, baseURL string) (domain.BuildingInfo, error)
- func (c *Client) GetEnnoblements(ctx context.Context, baseURL string, since time.Time) ([]domain.BaseEnnoblement, error)
- func (c *Client) GetOpenServers(ctx context.Context, baseURL string) ([]domain.OpenServer, error)
- func (c *Client) GetPlayers(ctx context.Context, baseURL string) ([]domain.BasePlayer, error)
- func (c *Client) GetServerConfig(ctx context.Context, baseURL string) (domain.ServerConfig, error)
- func (c *Client) GetTribes(ctx context.Context, baseURL string) ([]domain.BaseTribe, error)
- func (c *Client) GetUnitInfo(ctx context.Context, baseURL string) (domain.UnitInfo, error)
- func (c *Client) GetVillages(ctx context.Context, baseURL string) ([]domain.BaseVillage, error)
- type ClientOption
- type ParseError
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidServerKey = errors.New("invalid server key") ErrInvalidServerURL = errors.New("invalid server URL") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(opts ...ClientOption) *Client
func (*Client) GetBuildingInfo ¶
func (*Client) GetEnnoblements ¶
func (*Client) GetOpenServers ¶
func (*Client) GetPlayers ¶
func (*Client) GetServerConfig ¶
func (*Client) GetUnitInfo ¶
func (*Client) GetVillages ¶
type ClientOption ¶
type ClientOption func(c *Client)
func WithHTTPClient ¶
func WithHTTPClient(hc *http.Client) ClientOption
func WithUserAgent ¶
func WithUserAgent(ua string) ClientOption
type ParseError ¶
type ParseError struct {
// contains filtered or unexported fields
}
func NewParseError ¶
func NewParseError(err error, record []string, field string) ParseError
func (ParseError) Error ¶
func (e ParseError) Error() string
func (ParseError) Field ¶
func (e ParseError) Field() string
func (ParseError) Record ¶
func (e ParseError) Record() []string
func (ParseError) Unwrap ¶
func (e ParseError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.