Documentation
¶
Index ¶
- type CreateResponse
- type Handler
- func (h *Handler) Create(req SettingsObjectCreate) (*SettingsObjectResponse, error)
- func (h *Handler) Delete(objectID string) error
- func (h *Handler) Get(objectID string) (*SettingsObject, error)
- func (h *Handler) GetRaw(objectID string) ([]byte, error)
- func (h *Handler) GetSchema(schemaID string) (map[string]any, error)
- func (h *Handler) ListObjects(schemaID, scope string, chunkSize int64) (*SettingsObjectsList, error)
- func (h *Handler) ListSchemas() (*SchemaList, error)
- func (h *Handler) Update(objectID string, value map[string]any) (*SettingsObject, error)
- func (h *Handler) ValidateCreate(req SettingsObjectCreate) error
- func (h *Handler) ValidateUpdate(objectID string, value map[string]any) error
- type ModificationInfo
- type Schema
- type SchemaList
- type SettingsObject
- type SettingsObjectCreate
- type SettingsObjectResponse
- type SettingsObjectsList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateResponse ¶
type CreateResponse = sdksettings.CreateResponse
Re-export SDK types that are identical (no table tags needed in CLI).
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler handles settings resources. It delegates to the SDK handler and adds CLI-specific convenience methods.
func NewHandler ¶
NewHandler creates a new settings handler.
func (*Handler) Create ¶
func (h *Handler) Create(req SettingsObjectCreate) (*SettingsObjectResponse, error)
Create creates a new settings object.
func (*Handler) Delete ¶
Delete deletes a settings object. Auto-fetches the current schemaVersion for the If-Match header.
func (*Handler) Get ¶
func (h *Handler) Get(objectID string) (*SettingsObject, error)
Get gets a specific settings object by objectId.
func (*Handler) ListObjects ¶
func (h *Handler) ListObjects(schemaID, scope string, chunkSize int64) (*SettingsObjectsList, error)
ListObjects lists settings objects for a schema with automatic pagination.
func (*Handler) ListSchemas ¶
func (h *Handler) ListSchemas() (*SchemaList, error)
ListSchemas lists all available settings schemas.
func (*Handler) Update ¶
Update updates an existing settings object. Auto-fetches the current schemaVersion for the If-Match header, then re-fetches.
func (*Handler) ValidateCreate ¶
func (h *Handler) ValidateCreate(req SettingsObjectCreate) error
ValidateCreate validates a settings object without creating it.
type ModificationInfo ¶
type ModificationInfo = sdksettings.ModificationInfo
Re-export SDK types that are identical (no table tags needed in CLI).
type Schema ¶
type Schema struct {
SchemaID string `json:"schemaId" table:"SCHEMA_ID"`
DisplayName string `json:"displayName" table:"DISPLAY_NAME"`
Description string `json:"description,omitempty" table:"-"`
Version string `json:"version" table:"VERSION"`
MultiObject bool `json:"multiObject,omitempty" table:"MULTI,wide"`
Ordered bool `json:"ordered,omitempty" table:"ORDERED,wide"`
Properties map[string]any `json:"properties,omitempty" table:"-"`
Scopes []string `json:"scopes,omitempty" table:"-"`
}
Schema represents a settings schema (CLI version with table tags).
type SchemaList ¶
SchemaList represents a list of schemas.
type SettingsObject ¶
type SettingsObject struct {
ObjectID string `json:"objectId" table:"OBJECT_ID,wide"`
SchemaID string `json:"schemaId" table:"SCHEMA_ID"`
SchemaVersion string `json:"schemaVersion,omitempty" table:"VERSION,wide"`
Scope string `json:"scope" table:"SCOPE,wide"`
ExternalID string `json:"externalId,omitempty" table:"-"`
Summary string `json:"summary,omitempty" table:"SUMMARY"`
Value map[string]any `json:"value,omitempty" table:"-"`
ModificationInfo *ModificationInfo `json:"modificationInfo,omitempty" table:"-"`
// Display fields (computed, not from API)
ObjectIDShort string `json:"-" yaml:"-" table:"OBJECT_ID_SHORT"`
ScopeType string `json:"-" yaml:"-" table:"SCOPE_TYPE,wide"`
ScopeID string `json:"-" yaml:"-" table:"SCOPE_ID,wide"`
}
SettingsObject represents a settings object (CLI version with display fields and table tags).
type SettingsObjectCreate ¶
type SettingsObjectCreate = sdksettings.SettingsObjectCreate
Re-export SDK types that are identical (no table tags needed in CLI).
type SettingsObjectResponse ¶
type SettingsObjectResponse = sdksettings.SettingsObjectResponse
Re-export SDK types that are identical (no table tags needed in CLI).
type SettingsObjectsList ¶
type SettingsObjectsList struct {
Items []SettingsObject `json:"items"`
TotalCount int `json:"totalCount"`
NextPageKey string `json:"nextPageKey,omitempty"`
}
SettingsObjectsList represents a list of settings objects (CLI version using CLI SettingsObject).