Versions in this module Expand all Collapse all v0 v0.1.0 Jul 12, 2026 Changes in this version + const DefaultBaseURL + const DefaultClientRetries + const Version + func CloneQuery(query map[string]any) map[string]any + func DecodeJSON[T any](raw json.RawMessage, dest *T) error + func DecodeList[T any](raw json.RawMessage) ([]T, error) + func EncodeRepositoryID(repositoryID string) string + func FillPath(template string, vars map[string]string) (string, error) + func IsNotFound(err error) bool + func IsRetriable(err error) bool + func IsUnauthorized(err error) bool + func PaginateQuery[T any](ctx context.Context, baseQuery map[string]any, opt PageOptions, ...) ([]T, error) + func Paginate[T any](ctx context.Context, opt PageOptions, fetch FetchPage[T]) ([]T, error) + func PathEscape(filePath string) string + func WithPage(query map[string]any, page, perPage int) map[string]any + func WithPageKeys(query map[string]any, pageKey, perPageKey string, page, perPage int) map[string]any + type APIError struct + Body []byte + Code string + Message string + Method string + RequestID string + Status int + URL string + func AsAPIError(err error) (*APIError, bool) + func ParseAPIErrorBody(status int, method, url string, body []byte) *APIError + func (e *APIError) Error() string + func (e *APIError) Temporary() bool + type Client struct + func New(cfg Config) (*Client, error) + func NewWithDefaults(cfg Config) (*Client, error) + func (c *Client) BaseURL() string + func (c *Client) Call(ctx context.Context, ...) (json.RawMessage, error) + func (c *Client) CallOp(ctx context.Context, opName, organizationID string, pathVars map[string]string, ...) (json.RawMessage, error) + func (c *Client) Clone() *Client + func (c *Client) Do(ctx context.Context, method, p string, query map[string]any, body any) (json.RawMessage, error) + func (c *Client) GetCurrentOrganizationInfo(ctx context.Context) (*CurrentOrganizationInfo, error) + func (c *Client) GetCurrentUser(ctx context.Context) (*CurrentUser, error) + func (c *Client) GetUserOrganizations(ctx context.Context) ([]Organization, error) + func (c *Client) IsRegion() bool + func (c *Client) LastOrganizationID() string + func (c *Client) ResolveOrganizationID(ctx context.Context, explicit string) (string, error) + func (c *Client) ResolvePath(ctx context.Context, organizationID, regionTemplate, centralTemplate string, ...) (string, error) + func (c *Client) SetLastOrganizationID(id string) + func (c *Client) WithOrganization(organizationID string) *Client + type Config struct + BaseURL string + Debug bool + Edition string + HTTPClient *http.Client + Logger Logger + MaxRetries int + OrganizationID string + RegionDefaultOrgID string + RetryWait time.Duration + Token string + UserAgent string + type CurrentOrganizationInfo struct + LastOrganization string + UserID string + UserName string + type CurrentUser struct + CreatedAt string + Email string + ID string + LastOrganization string + Name string + type FetchPage func(ctx context.Context, page, perPage int) ([]T, error) + type FuncLogger func(format string, v ...any) + func (f FuncLogger) Printf(format string, v ...any) + type Logger interface + Printf func(format string, v ...any) + type OpSpec struct + BodyKeys []string + CentralPath string + Domain string + File string + GoName string + HasBody bool + Method string + Name string + PathParams []string + QueryKeys []string + RegionPath string + Required []string + Source string + func LookupOperation(name string) (OpSpec, bool, error) + func Operations() ([]OpSpec, error) + func (op OpSpec) MissingRequired(values map[string]any) []string + type Organization struct + CreatedAt string + CreatorID string + DefaultRole string + Description string + ID string + Name string + UpdateAt string + func DecodeOrganizationList(raw json.RawMessage) ([]Organization, error) + type PageOptions struct + MaxPages int + PageKey string + PerPage int + PerPageKey string + StartPage int + type WriterLogger struct + W io.Writer + func (l WriterLogger) Printf(format string, v ...any)