timestreamwrite

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: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	Name            string
	ARN             string
	Status          string
	KmsKeyId        string
	TableCount      int
	CreationTime    time.Time
	LastUpdatedTime time.Time
	Tags            map[string]string
	Lifecycle       *lifecycle.Machine
}

Database represents a Timestream database.

type Dimension

type Dimension struct {
	Name  string
	Value string
}

Dimension represents a record dimension.

type MagneticStoreWriteProperties

type MagneticStoreWriteProperties struct {
	EnableMagneticStoreWrites bool
}

MagneticStoreWriteProperties holds magnetic store config.

type Record

type Record struct {
	Dimensions       []Dimension
	MeasureName      string
	MeasureValue     string
	MeasureValueType string
	Time             string
	TimeUnit         string
}

Record represents a Timestream record (simplified).

type RetentionProperties

type RetentionProperties struct {
	MemoryStoreRetentionPeriodInHours  int64
	MagneticStoreRetentionPeriodInDays int64
}

RetentionProperties holds data retention config.

type Store

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

Store manages all Timestream resources.

func NewStore

func NewStore(accountID, region string) *Store

NewStore creates a new Timestream store.

func (*Store) CreateDatabase

func (s *Store) CreateDatabase(name, kmsKeyId string, tags map[string]string) (*Database, bool)

func (*Store) CreateTable

func (s *Store) CreateTable(dbName, tableName string, retention RetentionProperties, magnetic MagneticStoreWriteProperties, tags map[string]string) (*Table, bool)

func (*Store) DeleteDatabase

func (s *Store) DeleteDatabase(name string) bool

func (*Store) DeleteTable

func (s *Store) DeleteTable(dbName, tableName string) bool

func (*Store) GetDatabase

func (s *Store) GetDatabase(name string) (*Database, bool)

func (*Store) GetRecordCount

func (s *Store) GetRecordCount(dbName, tableName string) int

GetRecordCount returns the number of records in a table.

func (*Store) GetTable

func (s *Store) GetTable(dbName, tableName string) (*Table, bool)

func (*Store) ListDatabases

func (s *Store) ListDatabases() []*Database

func (*Store) ListTables

func (s *Store) ListTables(dbName string) []*Table

func (*Store) ListTagsForResource

func (s *Store) ListTagsForResource(arn string) (map[string]string, bool)

func (*Store) QueryRecords

func (s *Store) QueryRecords(dbName, tableName, startTime, endTime string) ([]Record, bool)

QueryRecords performs a basic query against stored records with optional time range filtering.

func (*Store) TagResource

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

func (*Store) UntagResource

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

func (*Store) UpdateDatabase

func (s *Store) UpdateDatabase(name, kmsKeyId string) (*Database, bool)

func (*Store) UpdateTable

func (s *Store) UpdateTable(dbName, tableName string, retention *RetentionProperties, magnetic *MagneticStoreWriteProperties) (*Table, bool)

func (*Store) WriteRecords

func (s *Store) WriteRecords(dbName, tableName string, records []Record) bool

type Table

type Table struct {
	Name                         string
	ARN                          string
	DatabaseName                 string
	Status                       string
	RetentionProperties          RetentionProperties
	MagneticStoreWriteProperties MagneticStoreWriteProperties
	CreationTime                 time.Time
	LastUpdatedTime              time.Time
	Tags                         map[string]string
	Lifecycle                    *lifecycle.Machine
}

Table represents a Timestream table.

type TimestreamWriteService

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

TimestreamWriteService is the cloudmock implementation of the AWS Timestream Write API.

func New

func New(accountID, region string) *TimestreamWriteService

New returns a new TimestreamWriteService.

func (*TimestreamWriteService) Actions

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

Actions returns the list of API actions supported.

func (*TimestreamWriteService) HandleRequest

HandleRequest routes an incoming request to the appropriate handler.

func (*TimestreamWriteService) HealthCheck

func (s *TimestreamWriteService) HealthCheck() error

HealthCheck always returns nil.

func (*TimestreamWriteService) Name

func (s *TimestreamWriteService) Name() string

Name returns the AWS service name used for routing.

Jump to

Keyboard shortcuts

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