Versions in this module Expand all Collapse all v0 v0.2.1 Jul 2, 2026 Changes in this version + const Version + var ErrBadRequest = &APIError + var ErrConflict = &APIError + var ErrForbidden = &APIError + var ErrNotFound = &APIError + var ErrRateLimited = &APIError + var ErrServer = &APIError + var ErrUnauthorized = &APIError + func IsForbidden(err error) bool + func IsNotFound(err error) bool + func IsRateLimited(err error) bool + func IsUnauthorized(err error) bool + func WalkPages(ctx context.Context, initial *ListOptions, maxPages int, fetch PageFetcher) error + type APIError struct + Body []byte + Message string + Method string + Response *http.Response + StatusCode int + URL string + func (e *APIError) Error() string + func (e *APIError) Is(target error) bool + type Authenticator interface + Authenticate func(req *http.Request) error + type BasicAuth struct + Password string + Username string + func (a *BasicAuth) Authenticate(req *http.Request) error + type BearerTokenAuth struct + Token string + func (a *BearerTokenAuth) Authenticate(req *http.Request) error + type Client struct + AccountBackups *accounts.BackupService + AccountTemplates *accounts.TemplatesService + Accounts *accounts.Service + Assets *assets.AssetsService + Audits *audits.Service + Auth *auth.Service + ChangeSecrets *accounts.ChangeSecretService + Clouds *assets.CategoryService + CommandFilters *acls.CommandFiltersService + Customs *assets.CategoryService + Databases *assets.CategoryService + Devices *assets.CategoryService + Gateways *assets.GatewaysService + Hosts *assets.CategoryService + Labels *labels.Service + LoginACLs *acls.LoginACLsService + Nodes *assets.NodesService + Ops *ops.Service + Organizations *orgs.Service + Permissions *perms.Service + Platforms *assets.PlatformsService + Roles *rbac.Service + Self *perms.SelfService + Settings *settings.Service + Terminal *terminal.Service + Tickets *tickets.Service + UserGroups *users.GroupsService + Users *users.Service + Webs *assets.CategoryService + Xpack *xpack.Service + Zones *assets.ZonesService + func NewClient(opts ...Option) *Client + func (c *Client) BaseURL() *url.URL + func (c *Client) Do(ctx context.Context, req *http.Request, v any) (*Response, error) + func (c *Client) DoRaw(ctx context.Context, req *http.Request, w io.Writer) (*Response, error) + func (c *Client) NewRequest(ctx context.Context, method, path string, body any) (*http.Request, error) + func (c *Client) WithOrgScope(id string) *Client + type HTTPClient = core.HTTPClient + type ListOptions = core.ListOptions + type Logger interface + Printf func(format string, v ...any) + type Option func(*clientConfig) + func WithAccessKeyAuth(keyID, secretID string) Option + func WithAuthenticator(a Authenticator) Option + func WithBaseURL(u string) Option + func WithBasicAuth(username, password string) Option + func WithBearerToken(token string) Option + func WithCookie(name, value string) Option + func WithDebugRequests(on bool) Option + func WithHTTPClient(hc *http.Client) Option + func WithHeader(key, value string) Option + func WithInsecureSkipVerify(skip bool) Option + func WithLogger(l Logger) Option + func WithOrg(id string) Option + func WithPrivateToken(token string) Option + func WithRetry(maxRetries int, minWait, maxWait time.Duration) Option + func WithTimeout(d time.Duration) Option + func WithUserAgent(ua string) Option + type PageFetcher = core.PageFetcher + type PrivateTokenAuth struct + Token string + func (a *PrivateTokenAuth) Authenticate(req *http.Request) error + type Response = core.Response + type SignatureAuth struct + KeyID string + SecretID string + func (a *SignatureAuth) Authenticate(req *http.Request) error