Documentation ¶
Index ¶
- type HTTPClient
- func (c *HTTPClient) CreatePath(ctx context.Context, body handler.CreatePathRequest) (int, *handler.CreatePathResponse, error)
- func (c *HTTPClient) CreateStat(ctx context.Context, pathId string, body handler.CreateStatRequest) (int, error)
- func (c *HTTPClient) DeletePath(ctx context.Context, pathId string) (int, error)
- func (c *HTTPClient) DeleteStat(ctx context.Context, pathId, statName string) (int, error)
- func (c *HTTPClient) FetchPath(ctx context.Context, pathId string) (int, *handler.PathResponse, error)
- func (c *HTTPClient) FetchUserPaths(ctx context.Context, userId string) (int, []*pathmodel.Path, error)
- func (c *HTTPClient) MakeRequest(ctx context.Context, method string, url string, body any) (int, []byte, error)
- func (c *HTTPClient) SetJWT(token string)
- func (c *HTTPClient) UpdatePath(ctx context.Context, pathId string, body pathmodel.Path) (int, error)
- func (c *HTTPClient) UpdateStat(ctx context.Context, pathId, statName string, newStat pathmodel.CountlessStat) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPClient ¶
type HTTPClient struct {
// contains filtered or unexported fields
}
func NewHTTPClient ¶
func NewHTTPClient(addr string) *HTTPClient
func (*HTTPClient) CreatePath ¶
func (c *HTTPClient) CreatePath(ctx context.Context, body handler.CreatePathRequest) (int, *handler.CreatePathResponse, error)
func (*HTTPClient) CreateStat ¶
func (c *HTTPClient) CreateStat(ctx context.Context, pathId string, body handler.CreateStatRequest) (int, error)
func (*HTTPClient) DeletePath ¶
func (*HTTPClient) DeleteStat ¶
func (*HTTPClient) FetchPath ¶
func (c *HTTPClient) FetchPath(ctx context.Context, pathId string) (int, *handler.PathResponse, error)
func (*HTTPClient) FetchUserPaths ¶
func (*HTTPClient) MakeRequest ¶
func (*HTTPClient) SetJWT ¶
func (c *HTTPClient) SetJWT(token string)
func (*HTTPClient) UpdatePath ¶
func (*HTTPClient) UpdateStat ¶
func (c *HTTPClient) UpdateStat(ctx context.Context, pathId, statName string, newStat pathmodel.CountlessStat) (int, error)
Click to show internal directories.
Click to hide internal directories.