keyspaces

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service is the cloudmock implementation of the AWS cassandra service.

func New

func New(accountID, region string) *Service

New returns a new keyspaces Service.

func (*Service) Actions

func (s *Service) Actions() []service.Action

Actions returns all supported API actions.

func (*Service) HandleRequest

func (s *Service) HandleRequest(ctx *service.RequestContext) (*service.Response, error)

HandleRequest routes a request to the appropriate handler.

func (*Service) HealthCheck

func (s *Service) HealthCheck() error

HealthCheck always returns nil.

func (*Service) Name

func (s *Service) Name() string

Name returns the AWS service name used for request routing.

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store is the in-memory data store for keyspaces resources.

func NewStore

func NewStore(accountID, region string) *Store

NewStore creates an empty Store.

func (*Store) CreateKeyspace

func (s *Store) CreateKeyspace(name, replicationType string, replicationRegions []string, tags map[string]string) (*StoredKeyspace, *service.AWSError)

func (*Store) CreateTable

func (s *Store) CreateTable(keyspace, name string, schema, capacity, encryption, pitr, ttl map[string]any, defaultTTL int, comment map[string]any, tags map[string]string) (*StoredTable, *service.AWSError)

func (*Store) CreateType

func (s *Store) CreateType(keyspace, name string, fields []map[string]any) (*StoredType, *service.AWSError)

func (*Store) DeleteKeyspace

func (s *Store) DeleteKeyspace(name string) *service.AWSError

func (*Store) DeleteTable

func (s *Store) DeleteTable(keyspace, name string) *service.AWSError

func (*Store) DeleteType

func (s *Store) DeleteType(keyspace, name string) *service.AWSError

func (*Store) GetKeyspace

func (s *Store) GetKeyspace(name string) (*StoredKeyspace, *service.AWSError)

func (*Store) GetTable

func (s *Store) GetTable(keyspace, name string) (*StoredTable, *service.AWSError)

func (*Store) GetType

func (s *Store) GetType(keyspace, name string) (*StoredType, *service.AWSError)

func (*Store) ListKeyspaces

func (s *Store) ListKeyspaces() []*StoredKeyspace

func (*Store) ListTables

func (s *Store) ListTables(keyspace string) []*StoredTable

func (*Store) ListTags

func (s *Store) ListTags(arn string) map[string]string

func (*Store) ListTypes

func (s *Store) ListTypes(keyspace string) []*StoredType

func (*Store) Reset

func (s *Store) Reset()

Reset clears all in-memory state.

func (*Store) RestoreTable

func (s *Store) RestoreTable(sourceKeyspace, sourceName, targetKeyspace, targetName string) (*StoredTable, *service.AWSError)

func (*Store) TagResource

func (s *Store) TagResource(arn string, tags map[string]string)

func (*Store) UntagResource

func (s *Store) UntagResource(arn string, keys []string)

func (*Store) UpdateKeyspace

func (s *Store) UpdateKeyspace(name string, replicationRegions []string) (*StoredKeyspace, *service.AWSError)

func (*Store) UpdateTable

func (s *Store) UpdateTable(keyspace, name string, schema, capacity, pitr map[string]any, defaultTTL *int) (*StoredTable, *service.AWSError)

type StoredKeyspace

type StoredKeyspace struct {
	Name               string
	Arn                string
	ReplicationType    string
	ReplicationRegions []string
	Tags               map[string]string
	CreatedAt          time.Time
}

StoredKeyspace is a persisted keyspace.

type StoredTable

type StoredTable struct {
	KeyspaceName      string
	TableName         string
	Arn               string
	Status            string
	SchemaDefinition  map[string]any
	CapacitySpec      map[string]any
	EncryptionSpec    map[string]any
	PITR              map[string]any
	TTL               map[string]any
	ClientEncoding    string
	DefaultTimeToLive int
	Comment           map[string]any
	CreatedAt         time.Time
	Tags              map[string]string
}

StoredTable is a persisted table.

type StoredType

type StoredType struct {
	KeyspaceName          string
	TypeName              string
	Arn                   string
	Fields                []map[string]any
	DirectReferringTables []string
	DirectParentTypes     []string
	MaxNestingDepth       int
	KeyspaceArn           string
	CreatedAt             time.Time
}

StoredType is a persisted user-defined type.

Jump to

Keyboard shortcuts

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