Documentation
¶
Index ¶
- Constants
- func TokenClaims(token string) map[string]any
- func TokenExpiry(token string) time.Time
- type APIError
- type AuthError
- type Client
- func (c *Client) BaseURL() string
- func (c *Client) Do(ctx context.Context, request Request) (*http.Response, error)
- func (c *Client) FileToken(ctx context.Context) (string, error)
- func (c *Client) GuardStatus(ctx context.Context) (*GuardStatus, error)
- func (c *Client) Host() string
- func (c *Client) JSON(ctx context.Context, method, path string, query url.Values, body, out any) error
- func (c *Client) Login(ctx context.Context, collection, identity, password string) (string, error)
- func (c *Client) Token(ctx context.Context) (string, error)
- func (c *Client) URL(path string, query url.Values) string
- type DryRunError
- type GuardStatus
- type Options
- type Request
Constants ¶
View Source
const ( GatewayKeyHeader = "X-Pbctl-Gateway-Key" ImpersonateHeader = "X-Pbctl-As" GuardStatusPath = "/api/pbctl/guard" )
Variables ¶
This section is empty.
Functions ¶
func TokenClaims ¶
func TokenExpiry ¶
Types ¶
type APIError ¶
func (*APIError) FieldErrors ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GuardStatus ¶
func (c *Client) GuardStatus(ctx context.Context) (*GuardStatus, error)
type DryRunError ¶
func (*DryRunError) Error ¶
func (e *DryRunError) Error() string
type GuardStatus ¶
Click to show internal directories.
Click to hide internal directories.