store

package
v0.0.0-...-624bb30 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host     string `yaml:"host"`
	Port     int    `yaml:"port"`
	User     string `yaml:"user"`
	Password string `yaml:"password"`
	Database string `yaml:"database"`
	SSLMode  string `yaml:"ssl_mode"`

	MaxConns int `yaml:"max_conns"`
}

func (*Config) DSN

func (c *Config) DSN() string

func (*Config) RegisterFlags

func (c *Config) RegisterFlags(f *flag.FlagSet)

func (*Config) Validate

func (c *Config) Validate() error

type ResourceModel

type ResourceModel struct {
	ID   string `sql:"type:uuid;column:id" json:"id"`
	Name string `sql:"type:text;column:api_name" json:"name"`

	CreateTime time.Time `cel:"createTime" sql:"type:timestamptz;column:created_at" json:"createTime"`
	UpdateTime time.Time `cel:"updateTime" sql:"type:timestamptz;column:updated_at" json:"updateTime"`
}

type ResourceModelMetadata

type ResourceModelMetadata struct {
	Labels      map[string]string `cel:"labels" sql:"type:uuid;column:metadata_labels" json:"labels"`
	Annotations map[string]string `cel:"annotations" sql:"type:text;column:metadata_annotations" json:"annotations"`
}

type Store

type Store struct {
	services.Service

	QB squirrel.StatementBuilderType
	// contains filtered or unexported fields
}

func New

func New(logger log.Logger, cfg Config) (*Store, error)

func (*Store) Pool

func (s *Store) Pool() *pgxpool.Pool

Jump to

Keyboard shortcuts

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