settings

package
v0.46.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2026 License: Apache-2.0 Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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

func NewHandler(c *client.Client) *Handler

NewHandler creates a new settings handler.

func (*Handler) Create

Create creates a new settings object.

func (*Handler) Delete

func (h *Handler) Delete(objectID string) error

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) GetRaw

func (h *Handler) GetRaw(objectID string) ([]byte, error)

GetRaw gets a settings object as raw JSON bytes (for editing).

func (*Handler) GetSchema

func (h *Handler) GetSchema(schemaID string) (map[string]any, error)

GetSchema gets a specific schema definition.

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

func (h *Handler) Update(objectID string, value map[string]any) (*SettingsObject, error)

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.

func (*Handler) ValidateUpdate

func (h *Handler) ValidateUpdate(objectID string, value map[string]any) error

ValidateUpdate validates a settings object update without applying it. Auto-fetches the current schemaVersion for the If-Match header.

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

type SchemaList struct {
	Items      []Schema `json:"items"`
	TotalCount int      `json:"totalCount"`
}

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).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL