settings20

package
v1.22.1 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Service

func Service[T settings.Settings](credentials *settings.Credentials, schemaID string, schemaVersion string, options ...*ServiceOptions[T]) settings.CRUDService[T]

Types

type Config

type Config interface {
	New() settings.Settings
}

type Matcher added in v1.22.0

type Matcher interface {
	Match(o any) bool
}

type ServiceOptions

type ServiceOptions[T settings.Settings] struct {
	LegacyID       func(id string) string
	Name           func(id string, v T) (string, error)
	HijackOnCreate func(err error, service settings.RService[T], v T) (*settings.Stub, error)
	CreateRetry    func(v T, err error) T
	UpdateRetry    func(v T, err error) T
}

type SettingsObject

type SettingsObject struct {
	SchemaVersion string          `json:"schemaVersion"`
	SchemaID      string          `json:"schemaId"`
	Scope         string          `json:"scope"`
	Value         json.RawMessage `json:"value"`
}

type SettingsObjectCreate

type SettingsObjectCreate struct {
	SchemaVersion string `json:"schemaVersion,omitempty"`
	SchemaID      string `json:"schemaId"`
	Scope         string `json:"scope"`
	Value         any    `json:"value"`
}

type SettingsObjectCreateResponse

type SettingsObjectCreateResponse struct {
	ObjectID string `json:"objectId"`
}

type SettingsObjectList

type SettingsObjectList struct {
	Items       []*SettingsObjectListItem `json:"items"`
	NextPageKey *string                   `json:"nextPageKey,omitempty"`
}

type SettingsObjectListItem

type SettingsObjectListItem struct {
	ObjectID      string          `json:"objectId"`
	Scope         string          `json:"scope"`
	SchemaVersion string          `json:"schemaVersion"`
	Value         json.RawMessage `json:"value"`
}

type SettingsObjectUpdate

type SettingsObjectUpdate struct {
	SchemaVersion string `json:"schemaVersion,omitempty"`
	Value         any    `json:"value"`
}

Jump to

Keyboard shortcuts

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