configdb

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectToConfigDB added in v1.4.0

func ConnectToConfigDB(ctx context.Context, opts ...dbopen.Options) (*pgxpool.Pool, error)

Types

type AdminApiKey

type AdminApiKey struct {
	ID          uuid.UUID  `json:"id"`
	KeyHash     string     `json:"key_hash"`
	Name        string     `json:"name"`
	Description *string    `json:"description"`
	CreatedAt   *time.Time `json:"created_at"`
}

type BucketConfiguration

type BucketConfiguration struct {
	ID            uuid.UUID `json:"id"`
	BucketName    string    `json:"bucket_name"`
	CloudProvider string    `json:"cloud_provider"`
	Region        string    `json:"region"`
	Endpoint      *string   `json:"endpoint"`
	Role          *string   `json:"role"`
	UsePathStyle  bool      `json:"use_path_style"`
	InsecureTls   bool      `json:"insecure_tls"`
}

type BucketPrefixMapping

type BucketPrefixMapping struct {
	ID             uuid.UUID `json:"id"`
	BucketID       uuid.UUID `json:"bucket_id"`
	OrganizationID uuid.UUID `json:"organization_id"`
	PathPrefix     string    `json:"path_prefix"`
	Signal         string    `json:"signal"`
}

type CCollector

type CCollector struct {
	ID               uuid.UUID        `json:"id"`
	CreatedAt        pgtype.Timestamp `json:"created_at"`
	UpdatedAt        pgtype.Timestamp `json:"updated_at"`
	CreatedBy        *string          `json:"created_by"`
	UpdatedBy        *string          `json:"updated_by"`
	OrganizationID   pgtype.UUID      `json:"organization_id"`
	StorageProfileID pgtype.UUID      `json:"storage_profile_id"`
	InstanceNum      int16            `json:"instance_num"`
	ExternalID       string           `json:"external_id"`
	DeletedAt        pgtype.Timestamp `json:"deleted_at"`
	DeletedBy        *string          `json:"deleted_by"`
	Type             int32            `json:"type"`
	Trusted          pgtype.Bool      `json:"trusted"`
	Version          *string          `json:"version"`
	Saas             pgtype.Bool      `json:"saas"`
	Style            *string          `json:"style"`
	DagHashSeed      pgtype.Int4      `json:"dag_hash_seed"`
	ConfigHashSeed   pgtype.Int4      `json:"config_hash_seed"`
	CollectorGroup   string           `json:"collector_group"`
	Flags            map[string]any   `json:"flags"`
}

type COrganization

type COrganization struct {
	ID                           uuid.UUID        `json:"id"`
	CreatedAt                    pgtype.Timestamp `json:"created_at"`
	UpdatedAt                    pgtype.Timestamp `json:"updated_at"`
	CreatedBy                    *string          `json:"created_by"`
	UpdatedBy                    *string          `json:"updated_by"`
	Name                         *string          `json:"name"`
	Enabled                      pgtype.Bool      `json:"enabled"`
	NotificationSlack            *string          `json:"notification_slack"`
	NotificationEmail            *string          `json:"notification_email"`
	NotificationPagerDutyService *string          `json:"notification_pager_duty_service"`
	Features                     map[string]any   `json:"features"`
}

type COrganizationApiKey

type COrganizationApiKey struct {
	ID             uuid.UUID        `json:"id"`
	CreatedAt      pgtype.Timestamp `json:"created_at"`
	UpdatedAt      pgtype.Timestamp `json:"updated_at"`
	CreatedBy      *string          `json:"created_by"`
	UpdatedBy      *string          `json:"updated_by"`
	OrganizationID pgtype.UUID      `json:"organization_id"`
	Name           *string          `json:"name"`
	ApiKey         *string          `json:"api_key"`
	Enabled        pgtype.Bool      `json:"enabled"`
}

type CStorageProfile

type CStorageProfile struct {
	ID             uuid.UUID `json:"id"`
	OrganizationID uuid.UUID `json:"organization_id"`
	CloudProvider  string    `json:"cloud_provider"`
	Bucket         string    `json:"bucket"`
	Region         string    `json:"region"`
	Role           *string   `json:"role"`
}

type CheckOrgBucketAccessParams

type CheckOrgBucketAccessParams struct {
	OrgID      uuid.UUID `json:"org_id"`
	BucketName string    `json:"bucket_name"`
}

type CreateAdminAPIKeyParams

type CreateAdminAPIKeyParams struct {
	KeyHash     string  `json:"key_hash"`
	Name        string  `json:"name"`
	Description *string `json:"description"`
}

type CreateBucketConfigurationParams

type CreateBucketConfigurationParams struct {
	BucketName    string  `json:"bucket_name"`
	CloudProvider string  `json:"cloud_provider"`
	Region        string  `json:"region"`
	Endpoint      *string `json:"endpoint"`
	Role          *string `json:"role"`
	UsePathStyle  bool    `json:"use_path_style"`
	InsecureTls   bool    `json:"insecure_tls"`
}

type CreateBucketPrefixMappingParams

type CreateBucketPrefixMappingParams struct {
	BucketID       uuid.UUID `json:"bucket_id"`
	OrganizationID uuid.UUID `json:"organization_id"`
	PathPrefix     string    `json:"path_prefix"`
	Signal         string    `json:"signal"`
}

type CreateOrganizationAPIKeyMappingParams

type CreateOrganizationAPIKeyMappingParams struct {
	ApiKeyID       uuid.UUID `json:"api_key_id"`
	OrganizationID uuid.UUID `json:"organization_id"`
}

type CreateOrganizationAPIKeyParams

type CreateOrganizationAPIKeyParams struct {
	KeyHash     string  `json:"key_hash"`
	Name        string  `json:"name"`
	Description *string `json:"description"`
}

type CreateOrganizationBucketParams

type CreateOrganizationBucketParams struct {
	OrganizationID uuid.UUID `json:"organization_id"`
	BucketID       uuid.UUID `json:"bucket_id"`
	InstanceNum    int16     `json:"instance_num"`
	CollectorName  string    `json:"collector_name"`
}

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
}

type DeleteOrgConfigParams added in v1.7.0

type DeleteOrgConfigParams struct {
	OrganizationID uuid.UUID `json:"organization_id"`
	Key            string    `json:"key"`
}

type DeleteOrganizationAPIKeyMappingByHashParams added in v1.4.0

type DeleteOrganizationAPIKeyMappingByHashParams struct {
	OrganizationID uuid.UUID `json:"organization_id"`
	KeyHash        string    `json:"key_hash"`
}

type DeleteOrganizationBucketMappingsParams added in v1.4.0

type DeleteOrganizationBucketMappingsParams struct {
	OrgIds         []uuid.UUID `json:"org_ids"`
	InstanceNums   []int16     `json:"instance_nums"`
	CollectorNames []string    `json:"collector_names"`
}

type DeleteOrganizationBucketParams added in v1.4.0

type DeleteOrganizationBucketParams struct {
	OrganizationID uuid.UUID `json:"organization_id"`
	BucketName     string    `json:"bucket_name"`
	InstanceNum    int16     `json:"instance_num"`
	CollectorName  string    `json:"collector_name"`
}

type ExpiryRunTracking added in v1.4.1

type ExpiryRunTracking struct {
	OrganizationID uuid.UUID        `json:"organization_id"`
	SignalType     string           `json:"signal_type"`
	LastRunAt      pgtype.Timestamp `json:"last_run_at"`
	CreatedAt      pgtype.Timestamp `json:"created_at"`
	UpdatedAt      pgtype.Timestamp `json:"updated_at"`
}

Tracks when expiry cleanup was last run for each organization and signal type. Separate from policy to avoid creating policy records just for tracking.

type GetActiveOrganizationsRow added in v1.4.1

type GetActiveOrganizationsRow struct {
	ID      uuid.UUID `json:"id"`
	Name    string    `json:"name"`
	Enabled bool      `json:"enabled"`
}

type GetAllBucketConfigurationsRow added in v1.4.0

type GetAllBucketConfigurationsRow struct {
	ID            uuid.UUID `json:"id"`
	BucketName    string    `json:"bucket_name"`
	CloudProvider string    `json:"cloud_provider"`
	Region        string    `json:"region"`
	Role          *string   `json:"role"`
}

type GetAllCBucketDataRow added in v1.4.0

type GetAllCBucketDataRow struct {
	BucketName     string      `json:"bucket_name"`
	CloudProvider  string      `json:"cloud_provider"`
	Region         string      `json:"region"`
	Role           *string     `json:"role"`
	OrganizationID pgtype.UUID `json:"organization_id"`
	InstanceNum    pgtype.Int2 `json:"instance_num"`
	CollectorName  *string     `json:"collector_name"`
}

type GetAllCOrganizationAPIKeysForSyncRow

type GetAllCOrganizationAPIKeysForSyncRow struct {
	OrganizationID pgtype.UUID `json:"organization_id"`
	ApiKey         *string     `json:"api_key"`
	Name           *string     `json:"name"`
	Enabled        pgtype.Bool `json:"enabled"`
}

type GetAllCOrganizationAPIKeysRow added in v1.4.0

type GetAllCOrganizationAPIKeysRow struct {
	ID             uuid.UUID   `json:"id"`
	OrganizationID pgtype.UUID `json:"organization_id"`
	Name           *string     `json:"name"`
	ApiKey         *string     `json:"api_key"`
	Enabled        pgtype.Bool `json:"enabled"`
}

type GetAllCOrganizationsRow added in v1.4.0

type GetAllCOrganizationsRow struct {
	ID        uuid.UUID        `json:"id"`
	Name      *string          `json:"name"`
	Enabled   pgtype.Bool      `json:"enabled"`
	CreatedAt pgtype.Timestamp `json:"created_at"`
}

type GetAllCStorageProfilesForSyncRow

type GetAllCStorageProfilesForSyncRow struct {
	BucketName     string    `json:"bucket_name"`
	CloudProvider  string    `json:"cloud_provider"`
	Region         string    `json:"region"`
	Role           *string   `json:"role"`
	OrganizationID uuid.UUID `json:"organization_id"`
}

type GetAllOrganizationAPIKeyMappingsRow added in v1.4.0

type GetAllOrganizationAPIKeyMappingsRow struct {
	OrganizationID uuid.UUID `json:"organization_id"`
	KeyHash        string    `json:"key_hash"`
	Name           string    `json:"name"`
}

type GetAllOrganizationAPIKeysRow

type GetAllOrganizationAPIKeysRow struct {
	ID             uuid.UUID  `json:"id"`
	KeyHash        string     `json:"key_hash"`
	Name           string     `json:"name"`
	Description    *string    `json:"description"`
	CreatedAt      *time.Time `json:"created_at"`
	OrganizationID uuid.UUID  `json:"organization_id"`
}

type GetAllOrganizationBucketMappingsRow added in v1.4.0

type GetAllOrganizationBucketMappingsRow struct {
	OrganizationID uuid.UUID `json:"organization_id"`
	InstanceNum    int16     `json:"instance_num"`
	CollectorName  string    `json:"collector_name"`
	BucketName     string    `json:"bucket_name"`
}

type GetAllOrganizationsRow added in v1.4.0

type GetAllOrganizationsRow struct {
	ID      uuid.UUID `json:"id"`
	Name    string    `json:"name"`
	Enabled bool      `json:"enabled"`
}

type GetBucketPrefixMappingsRow added in v1.4.0

type GetBucketPrefixMappingsRow struct {
	OrganizationID uuid.UUID `json:"organization_id"`
	PathPrefix     string    `json:"path_prefix"`
	Signal         string    `json:"signal"`
}

type GetDefaultOrganizationBucketRow

type GetDefaultOrganizationBucketRow struct {
	OrganizationID uuid.UUID `json:"organization_id"`
	InstanceNum    int16     `json:"instance_num"`
	CollectorName  string    `json:"collector_name"`
	BucketName     string    `json:"bucket_name"`
	CloudProvider  string    `json:"cloud_provider"`
	Region         string    `json:"region"`
	Role           *string   `json:"role"`
	Endpoint       *string   `json:"endpoint"`
	UsePathStyle   bool      `json:"use_path_style"`
	InsecureTls    bool      `json:"insecure_tls"`
}

type GetExpiryLastRunParams added in v1.4.1

type GetExpiryLastRunParams struct {
	OrganizationID uuid.UUID `json:"organization_id"`
	SignalType     string    `json:"signal_type"`
}

type GetLongestPrefixMatchParams

type GetLongestPrefixMatchParams struct {
	BucketName string `json:"bucket_name"`
	ObjectPath string `json:"object_path"`
}

type GetLongestPrefixMatchRow added in v1.4.0

type GetLongestPrefixMatchRow struct {
	OrganizationID uuid.UUID `json:"organization_id"`
	Signal         string    `json:"signal"`
}

type GetLowestInstanceOrganizationBucketParams added in v1.3.0

type GetLowestInstanceOrganizationBucketParams struct {
	OrganizationID uuid.UUID `json:"organization_id"`
	BucketName     string    `json:"bucket_name"`
}

type GetLowestInstanceOrganizationBucketRow added in v1.3.0

type GetLowestInstanceOrganizationBucketRow struct {
	OrganizationID uuid.UUID `json:"organization_id"`
	InstanceNum    int16     `json:"instance_num"`
	CollectorName  string    `json:"collector_name"`
	BucketName     string    `json:"bucket_name"`
	CloudProvider  string    `json:"cloud_provider"`
	Region         string    `json:"region"`
	Role           *string   `json:"role"`
	Endpoint       *string   `json:"endpoint"`
	UsePathStyle   bool      `json:"use_path_style"`
	InsecureTls    bool      `json:"insecure_tls"`
}

type GetOrgConfigParams added in v1.7.0

type GetOrgConfigParams struct {
	OrganizationID uuid.UUID `json:"organization_id"`
	Key            string    `json:"key"`
}

type GetOrganizationAPIKeyByHashRow

type GetOrganizationAPIKeyByHashRow struct {
	ID             uuid.UUID  `json:"id"`
	KeyHash        string     `json:"key_hash"`
	Name           string     `json:"name"`
	Description    *string    `json:"description"`
	CreatedAt      *time.Time `json:"created_at"`
	OrganizationID uuid.UUID  `json:"organization_id"`
}

type GetOrganizationAPIKeyByIDRow

type GetOrganizationAPIKeyByIDRow struct {
	ID             uuid.UUID  `json:"id"`
	KeyHash        string     `json:"key_hash"`
	Name           string     `json:"name"`
	Description    *string    `json:"description"`
	CreatedAt      *time.Time `json:"created_at"`
	OrganizationID uuid.UUID  `json:"organization_id"`
}

type GetOrganizationBucketByCollectorParams

type GetOrganizationBucketByCollectorParams struct {
	OrganizationID uuid.UUID `json:"organization_id"`
	CollectorName  string    `json:"collector_name"`
}

type GetOrganizationBucketByCollectorRow

type GetOrganizationBucketByCollectorRow struct {
	OrganizationID uuid.UUID `json:"organization_id"`
	InstanceNum    int16     `json:"instance_num"`
	CollectorName  string    `json:"collector_name"`
	BucketName     string    `json:"bucket_name"`
	CloudProvider  string    `json:"cloud_provider"`
	Region         string    `json:"region"`
	Role           *string   `json:"role"`
	Endpoint       *string   `json:"endpoint"`
	UsePathStyle   bool      `json:"use_path_style"`
	InsecureTls    bool      `json:"insecure_tls"`
}

type GetOrganizationBucketByInstanceParams

type GetOrganizationBucketByInstanceParams struct {
	OrganizationID uuid.UUID `json:"organization_id"`
	InstanceNum    int16     `json:"instance_num"`
}

type GetOrganizationBucketByInstanceRow

type GetOrganizationBucketByInstanceRow struct {
	OrganizationID uuid.UUID `json:"organization_id"`
	InstanceNum    int16     `json:"instance_num"`
	CollectorName  string    `json:"collector_name"`
	BucketName     string    `json:"bucket_name"`
	CloudProvider  string    `json:"cloud_provider"`
	Region         string    `json:"region"`
	Role           *string   `json:"role"`
	Endpoint       *string   `json:"endpoint"`
	UsePathStyle   bool      `json:"use_path_style"`
	InsecureTls    bool      `json:"insecure_tls"`
}

type GetOrganizationExpiryParams added in v1.4.1

type GetOrganizationExpiryParams struct {
	OrganizationID uuid.UUID `json:"organization_id"`
	SignalType     string    `json:"signal_type"`
}

type GetStorageProfileByCollectorNameRow

type GetStorageProfileByCollectorNameRow struct {
	CloudProvider  string    `json:"cloud_provider"`
	Region         string    `json:"region"`
	Role           *string   `json:"role"`
	Bucket         string    `json:"bucket"`
	InstanceNum    int16     `json:"instance_num"`
	OrganizationID uuid.UUID `json:"organization_id"`
	ExternalID     string    `json:"external_id"`
}

type GetStorageProfileParams

type GetStorageProfileParams struct {
	OrganizationID pgtype.UUID `json:"organization_id"`
	InstanceNum    int16       `json:"instance_num"`
}

type GetStorageProfileRow

type GetStorageProfileRow struct {
	CloudProvider  string    `json:"cloud_provider"`
	Region         string    `json:"region"`
	Role           *string   `json:"role"`
	Bucket         string    `json:"bucket"`
	InstanceNum    int16     `json:"instance_num"`
	OrganizationID uuid.UUID `json:"organization_id"`
	ExternalID     string    `json:"external_id"`
}

type GetStorageProfilesByBucketNameRow

type GetStorageProfilesByBucketNameRow struct {
	CloudProvider  string    `json:"cloud_provider"`
	Region         string    `json:"region"`
	Role           *string   `json:"role"`
	Bucket         string    `json:"bucket"`
	InstanceNum    int16     `json:"instance_num"`
	OrganizationID uuid.UUID `json:"organization_id"`
	ExternalID     string    `json:"external_id"`
}

type ListBucketPrefixMappingsRow

type ListBucketPrefixMappingsRow struct {
	ID             uuid.UUID `json:"id"`
	BucketName     string    `json:"bucket_name"`
	OrganizationID uuid.UUID `json:"organization_id"`
	PathPrefix     string    `json:"path_prefix"`
	Signal         string    `json:"signal"`
}

type ListOrgConfigsRow added in v1.7.0

type ListOrgConfigsRow struct {
	Key       string          `json:"key"`
	Value     json.RawMessage `json:"value"`
	CreatedAt time.Time       `json:"created_at"`
	UpdatedAt time.Time       `json:"updated_at"`
}

type ListOrganizationAPIKeysByOrgRow added in v1.4.0

type ListOrganizationAPIKeysByOrgRow struct {
	ID          uuid.UUID `json:"id"`
	Name        string    `json:"name"`
	KeyHash     string    `json:"key_hash"`
	Description *string   `json:"description"`
}

type ListOrganizationBucketsByOrgRow added in v1.4.0

type ListOrganizationBucketsByOrgRow struct {
	OrganizationID uuid.UUID `json:"organization_id"`
	BucketName     string    `json:"bucket_name"`
	InstanceNum    int16     `json:"instance_num"`
	CollectorName  string    `json:"collector_name"`
}

type Organization

type Organization struct {
	ID        uuid.UUID  `json:"id"`
	Name      string     `json:"name"`
	Enabled   bool       `json:"enabled"`
	CreatedAt time.Time  `json:"created_at"`
	SyncedAt  *time.Time `json:"synced_at"`
}

type OrganizationApiKey

type OrganizationApiKey struct {
	ID          uuid.UUID  `json:"id"`
	KeyHash     string     `json:"key_hash"`
	Name        string     `json:"name"`
	Description *string    `json:"description"`
	CreatedAt   *time.Time `json:"created_at"`
}

type OrganizationApiKeyMapping

type OrganizationApiKeyMapping struct {
	ID             uuid.UUID `json:"id"`
	ApiKeyID       uuid.UUID `json:"api_key_id"`
	OrganizationID uuid.UUID `json:"organization_id"`
}

type OrganizationBucket

type OrganizationBucket struct {
	ID             uuid.UUID `json:"id"`
	OrganizationID uuid.UUID `json:"organization_id"`
	BucketID       uuid.UUID `json:"bucket_id"`
	InstanceNum    int16     `json:"instance_num"`
	CollectorName  string    `json:"collector_name"`
}

type OrganizationConfig added in v1.7.0

type OrganizationConfig struct {
	OrganizationID uuid.UUID       `json:"organization_id"`
	Key            string          `json:"key"`
	Value          json.RawMessage `json:"value"`
	CreatedAt      time.Time       `json:"created_at"`
	UpdatedAt      time.Time       `json:"updated_at"`
}

type OrganizationSignalExpiry added in v1.4.1

type OrganizationSignalExpiry struct {
	OrganizationID uuid.UUID `json:"organization_id"`
	SignalType     string    `json:"signal_type"`
	MaxAgeDays     int32     `json:"max_age_days"`
	CreatedAt      time.Time `json:"created_at"`
	UpdatedAt      time.Time `json:"updated_at"`
}

Stores data retention policies for each organization and signal type. A value of -1 means use system default, 0 means never expire, >0 means specific retention days.

type Querier

type Querier interface {
	CheckOrgBucketAccess(ctx context.Context, arg CheckOrgBucketAccessParams) (bool, error)
	ClearAdminAPIKeys(ctx context.Context) error
	ClearBucketConfigurations(ctx context.Context) error
	ClearBucketPrefixMappings(ctx context.Context) error
	ClearOrganizationAPIKeyMappings(ctx context.Context) error
	ClearOrganizationAPIKeys(ctx context.Context) error
	ClearOrganizationBuckets(ctx context.Context) error
	ClearOrganizations(ctx context.Context) error
	CreateAdminAPIKey(ctx context.Context, arg CreateAdminAPIKeyParams) (AdminApiKey, error)
	CreateBucketConfiguration(ctx context.Context, arg CreateBucketConfigurationParams) (BucketConfiguration, error)
	CreateBucketPrefixMapping(ctx context.Context, arg CreateBucketPrefixMappingParams) (BucketPrefixMapping, error)
	CreateOrganizationAPIKey(ctx context.Context, arg CreateOrganizationAPIKeyParams) (OrganizationApiKey, error)
	CreateOrganizationAPIKeyMapping(ctx context.Context, arg CreateOrganizationAPIKeyMappingParams) (OrganizationApiKeyMapping, error)
	CreateOrganizationBucket(ctx context.Context, arg CreateOrganizationBucketParams) (OrganizationBucket, error)
	DeleteAdminAPIKey(ctx context.Context, apiKeyID uuid.UUID) error
	DeleteBucketConfiguration(ctx context.Context, bucketName string) error
	DeleteBucketPrefixMapping(ctx context.Context, id uuid.UUID) error
	// Delete a specific config for an org.
	DeleteOrgConfig(ctx context.Context, arg DeleteOrgConfigParams) error
	DeleteOrganization(ctx context.Context, id uuid.UUID) error
	DeleteOrganizationAPIKey(ctx context.Context, id uuid.UUID) error
	DeleteOrganizationAPIKeyMapping(ctx context.Context, apiKeyID uuid.UUID) error
	// Delete API key mapping by hash
	DeleteOrganizationAPIKeyMappingByHash(ctx context.Context, arg DeleteOrganizationAPIKeyMappingByHashParams) error
	DeleteOrganizationBucket(ctx context.Context, arg DeleteOrganizationBucketParams) error
	// Delete organization bucket mappings not in c_ tables
	DeleteOrganizationBucketMappings(ctx context.Context, arg DeleteOrganizationBucketMappingsParams) error
	// Delete organizations not in c_ tables
	DeleteOrganizationsNotInList(ctx context.Context, idsToDelete []uuid.UUID) error
	GetActiveOrganizations(ctx context.Context) ([]GetActiveOrganizationsRow, error)
	GetAdminAPIKeyByHash(ctx context.Context, keyHash string) (AdminApiKey, error)
	GetAdminAPIKeyByID(ctx context.Context, apiKeyID uuid.UUID) (AdminApiKey, error)
	GetAllAdminAPIKeys(ctx context.Context) ([]AdminApiKey, error)
	// Get all our bucket configurations
	GetAllBucketConfigurations(ctx context.Context) ([]GetAllBucketConfigurationsRow, error)
	// Get all bucket configurations from c_ tables with org mappings
	GetAllCBucketData(ctx context.Context) ([]GetAllCBucketDataRow, error)
	// Get all API keys from c_ tables
	GetAllCOrganizationAPIKeys(ctx context.Context) ([]GetAllCOrganizationAPIKeysRow, error)
	GetAllCOrganizationAPIKeysForSync(ctx context.Context) ([]GetAllCOrganizationAPIKeysForSyncRow, error)
	// This file contains queries for syncing data from legacy c_ tables (managed externally)
	// to our own tables that we control.
	// Fetch all organizations from c_ tables
	GetAllCOrganizations(ctx context.Context) ([]GetAllCOrganizationsRow, error)
	// Legacy table sync operations
	GetAllCStorageProfilesForSync(ctx context.Context) ([]GetAllCStorageProfilesForSyncRow, error)
	// Get all our API key mappings
	GetAllOrganizationAPIKeyMappings(ctx context.Context) ([]GetAllOrganizationAPIKeyMappingsRow, error)
	GetAllOrganizationAPIKeys(ctx context.Context) ([]GetAllOrganizationAPIKeysRow, error)
	// Get all our organization bucket mappings
	GetAllOrganizationBucketMappings(ctx context.Context) ([]GetAllOrganizationBucketMappingsRow, error)
	// Fetch all our organizations
	GetAllOrganizations(ctx context.Context) ([]GetAllOrganizationsRow, error)
	GetBucketByOrganization(ctx context.Context, organizationID uuid.UUID) (string, error)
	GetBucketConfiguration(ctx context.Context, bucketName string) (BucketConfiguration, error)
	GetBucketConfigurationByName(ctx context.Context, bucketName string) (BucketConfiguration, error)
	GetBucketPrefixMappings(ctx context.Context, bucketName string) ([]GetBucketPrefixMappingsRow, error)
	GetDefaultOrganizationBucket(ctx context.Context, organizationID uuid.UUID) (GetDefaultOrganizationBucketRow, error)
	GetExpiryLastRun(ctx context.Context, arg GetExpiryLastRunParams) (ExpiryRunTracking, error)
	GetLongestPrefixMatch(ctx context.Context, arg GetLongestPrefixMatchParams) (GetLongestPrefixMatchRow, error)
	GetLowestInstanceOrganizationBucket(ctx context.Context, arg GetLowestInstanceOrganizationBucketParams) (GetLowestInstanceOrganizationBucketRow, error)
	// Get config for a specific org and key. Returns NULL if not found.
	GetOrgConfig(ctx context.Context, arg GetOrgConfigParams) (json.RawMessage, error)
	GetOrganization(ctx context.Context, id uuid.UUID) (Organization, error)
	GetOrganizationAPIKeyByHash(ctx context.Context, keyHash string) (GetOrganizationAPIKeyByHashRow, error)
	GetOrganizationAPIKeyByID(ctx context.Context, apiKeyID uuid.UUID) (GetOrganizationAPIKeyByIDRow, error)
	GetOrganizationBucketByCollector(ctx context.Context, arg GetOrganizationBucketByCollectorParams) (GetOrganizationBucketByCollectorRow, error)
	GetOrganizationBucketByInstance(ctx context.Context, arg GetOrganizationBucketByInstanceParams) (GetOrganizationBucketByInstanceRow, error)
	GetOrganizationByName(ctx context.Context, name string) (Organization, error)
	GetOrganizationExpiry(ctx context.Context, arg GetOrganizationExpiryParams) (OrganizationSignalExpiry, error)
	GetOrganizationsByBucket(ctx context.Context, bucketName string) ([]uuid.UUID, error)
	GetStorageProfileByCollectorNameUncached(ctx context.Context, organizationID pgtype.UUID) (GetStorageProfileByCollectorNameRow, error)
	GetStorageProfileUncached(ctx context.Context, arg GetStorageProfileParams) (GetStorageProfileRow, error)
	GetStorageProfilesByBucketNameUncached(ctx context.Context, bucketName string) ([]GetStorageProfilesByBucketNameRow, error)
	HasExistingStorageProfiles(ctx context.Context) (bool, error)
	ListBucketConfigurations(ctx context.Context) ([]BucketConfiguration, error)
	ListBucketPrefixMappings(ctx context.Context) ([]ListBucketPrefixMappingsRow, error)
	ListEnabledOrganizations(ctx context.Context) ([]Organization, error)
	// List all config keys/values for an org.
	ListOrgConfigs(ctx context.Context, organizationID uuid.UUID) ([]ListOrgConfigsRow, error)
	ListOrganizationAPIKeysByOrg(ctx context.Context, organizationID uuid.UUID) ([]ListOrganizationAPIKeysByOrgRow, error)
	ListOrganizationBucketsByOrg(ctx context.Context, organizationID uuid.UUID) ([]ListOrganizationBucketsByOrgRow, error)
	ListOrganizations(ctx context.Context) ([]Organization, error)
	UpsertAdminAPIKey(ctx context.Context, arg UpsertAdminAPIKeyParams) (AdminApiKey, error)
	UpsertBucketConfiguration(ctx context.Context, arg UpsertBucketConfigurationParams) (BucketConfiguration, error)
	UpsertExpiryRunTracking(ctx context.Context, arg UpsertExpiryRunTrackingParams) error
	// Insert or update a config value for an org.
	UpsertOrgConfig(ctx context.Context, arg UpsertOrgConfigParams) error
	UpsertOrganization(ctx context.Context, arg UpsertOrganizationParams) (Organization, error)
	UpsertOrganizationAPIKey(ctx context.Context, arg UpsertOrganizationAPIKeyParams) (OrganizationApiKey, error)
	UpsertOrganizationAPIKeyMapping(ctx context.Context, arg UpsertOrganizationAPIKeyMappingParams) error
	UpsertOrganizationBucket(ctx context.Context, arg UpsertOrganizationBucketParams) error
	UpsertOrganizationExpiry(ctx context.Context, arg UpsertOrganizationExpiryParams) error
	// Upsert organization
	UpsertOrganizationSync(ctx context.Context, arg UpsertOrganizationSyncParams) error
}

type QuerierFull

type QuerierFull = StoreFull

QuerierFull is deprecated, use StoreFull instead

func ConfigDBStore added in v1.4.0

func ConfigDBStore(ctx context.Context) (QuerierFull, error)

func ConfigDBStoreForAdmin added in v1.4.0

func ConfigDBStoreForAdmin(ctx context.Context) (QuerierFull, error)

ConfigDBStoreForAdmin connects to ConfigDB with admin-friendly migration checking that warns and continues instead of failing on migration mismatches

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CheckOrgBucketAccess

func (q *Queries) CheckOrgBucketAccess(ctx context.Context, arg CheckOrgBucketAccessParams) (bool, error)

func (*Queries) ClearAdminAPIKeys

func (q *Queries) ClearAdminAPIKeys(ctx context.Context) error

func (*Queries) ClearBucketConfigurations

func (q *Queries) ClearBucketConfigurations(ctx context.Context) error

func (*Queries) ClearBucketPrefixMappings

func (q *Queries) ClearBucketPrefixMappings(ctx context.Context) error

func (*Queries) ClearOrganizationAPIKeyMappings

func (q *Queries) ClearOrganizationAPIKeyMappings(ctx context.Context) error

func (*Queries) ClearOrganizationAPIKeys

func (q *Queries) ClearOrganizationAPIKeys(ctx context.Context) error

func (*Queries) ClearOrganizationBuckets

func (q *Queries) ClearOrganizationBuckets(ctx context.Context) error

func (*Queries) ClearOrganizations

func (q *Queries) ClearOrganizations(ctx context.Context) error

func (*Queries) CreateAdminAPIKey

func (q *Queries) CreateAdminAPIKey(ctx context.Context, arg CreateAdminAPIKeyParams) (AdminApiKey, error)

func (*Queries) CreateBucketConfiguration

func (q *Queries) CreateBucketConfiguration(ctx context.Context, arg CreateBucketConfigurationParams) (BucketConfiguration, error)

func (*Queries) CreateBucketPrefixMapping

func (q *Queries) CreateBucketPrefixMapping(ctx context.Context, arg CreateBucketPrefixMappingParams) (BucketPrefixMapping, error)

func (*Queries) CreateOrganizationAPIKey

func (q *Queries) CreateOrganizationAPIKey(ctx context.Context, arg CreateOrganizationAPIKeyParams) (OrganizationApiKey, error)

func (*Queries) CreateOrganizationBucket

func (q *Queries) CreateOrganizationBucket(ctx context.Context, arg CreateOrganizationBucketParams) (OrganizationBucket, error)

func (*Queries) DeleteAdminAPIKey

func (q *Queries) DeleteAdminAPIKey(ctx context.Context, apiKeyID uuid.UUID) error

func (*Queries) DeleteBucketConfiguration

func (q *Queries) DeleteBucketConfiguration(ctx context.Context, bucketName string) error

func (*Queries) DeleteBucketPrefixMapping

func (q *Queries) DeleteBucketPrefixMapping(ctx context.Context, id uuid.UUID) error

func (*Queries) DeleteOrgConfig added in v1.7.0

func (q *Queries) DeleteOrgConfig(ctx context.Context, arg DeleteOrgConfigParams) error

Delete a specific config for an org.

func (*Queries) DeleteOrganization

func (q *Queries) DeleteOrganization(ctx context.Context, id uuid.UUID) error

func (*Queries) DeleteOrganizationAPIKey

func (q *Queries) DeleteOrganizationAPIKey(ctx context.Context, id uuid.UUID) error

func (*Queries) DeleteOrganizationAPIKeyMapping added in v1.4.0

func (q *Queries) DeleteOrganizationAPIKeyMapping(ctx context.Context, apiKeyID uuid.UUID) error

func (*Queries) DeleteOrganizationAPIKeyMappingByHash added in v1.4.0

func (q *Queries) DeleteOrganizationAPIKeyMappingByHash(ctx context.Context, arg DeleteOrganizationAPIKeyMappingByHashParams) error

Delete API key mapping by hash

func (*Queries) DeleteOrganizationBucket added in v1.4.0

func (q *Queries) DeleteOrganizationBucket(ctx context.Context, arg DeleteOrganizationBucketParams) error

func (*Queries) DeleteOrganizationBucketMappings added in v1.4.0

func (q *Queries) DeleteOrganizationBucketMappings(ctx context.Context, arg DeleteOrganizationBucketMappingsParams) error

Delete organization bucket mappings not in c_ tables

func (*Queries) DeleteOrganizationsNotInList added in v1.4.0

func (q *Queries) DeleteOrganizationsNotInList(ctx context.Context, idsToDelete []uuid.UUID) error

Delete organizations not in c_ tables

func (*Queries) GetActiveOrganizations added in v1.4.1

func (q *Queries) GetActiveOrganizations(ctx context.Context) ([]GetActiveOrganizationsRow, error)

func (*Queries) GetAdminAPIKeyByHash

func (q *Queries) GetAdminAPIKeyByHash(ctx context.Context, keyHash string) (AdminApiKey, error)

func (*Queries) GetAdminAPIKeyByID

func (q *Queries) GetAdminAPIKeyByID(ctx context.Context, apiKeyID uuid.UUID) (AdminApiKey, error)

func (*Queries) GetAllAdminAPIKeys

func (q *Queries) GetAllAdminAPIKeys(ctx context.Context) ([]AdminApiKey, error)

func (*Queries) GetAllBucketConfigurations added in v1.4.0

func (q *Queries) GetAllBucketConfigurations(ctx context.Context) ([]GetAllBucketConfigurationsRow, error)

Get all our bucket configurations

func (*Queries) GetAllCBucketData added in v1.4.0

func (q *Queries) GetAllCBucketData(ctx context.Context) ([]GetAllCBucketDataRow, error)

Get all bucket configurations from c_ tables with org mappings

func (*Queries) GetAllCOrganizationAPIKeys added in v1.4.0

func (q *Queries) GetAllCOrganizationAPIKeys(ctx context.Context) ([]GetAllCOrganizationAPIKeysRow, error)

Get all API keys from c_ tables

func (*Queries) GetAllCOrganizationAPIKeysForSync

func (q *Queries) GetAllCOrganizationAPIKeysForSync(ctx context.Context) ([]GetAllCOrganizationAPIKeysForSyncRow, error)

func (*Queries) GetAllCOrganizations added in v1.4.0

func (q *Queries) GetAllCOrganizations(ctx context.Context) ([]GetAllCOrganizationsRow, error)

This file contains queries for syncing data from legacy c_ tables (managed externally) to our own tables that we control. Fetch all organizations from c_ tables

func (*Queries) GetAllCStorageProfilesForSync

func (q *Queries) GetAllCStorageProfilesForSync(ctx context.Context) ([]GetAllCStorageProfilesForSyncRow, error)

Legacy table sync operations

func (*Queries) GetAllOrganizationAPIKeyMappings added in v1.4.0

func (q *Queries) GetAllOrganizationAPIKeyMappings(ctx context.Context) ([]GetAllOrganizationAPIKeyMappingsRow, error)

Get all our API key mappings

func (*Queries) GetAllOrganizationAPIKeys

func (q *Queries) GetAllOrganizationAPIKeys(ctx context.Context) ([]GetAllOrganizationAPIKeysRow, error)

func (*Queries) GetAllOrganizationBucketMappings added in v1.4.0

func (q *Queries) GetAllOrganizationBucketMappings(ctx context.Context) ([]GetAllOrganizationBucketMappingsRow, error)

Get all our organization bucket mappings

func (*Queries) GetAllOrganizations added in v1.4.0

func (q *Queries) GetAllOrganizations(ctx context.Context) ([]GetAllOrganizationsRow, error)

Fetch all our organizations

func (*Queries) GetBucketByOrganization

func (q *Queries) GetBucketByOrganization(ctx context.Context, organizationID uuid.UUID) (string, error)

func (*Queries) GetBucketConfiguration

func (q *Queries) GetBucketConfiguration(ctx context.Context, bucketName string) (BucketConfiguration, error)

func (*Queries) GetBucketConfigurationByName added in v1.4.0

func (q *Queries) GetBucketConfigurationByName(ctx context.Context, bucketName string) (BucketConfiguration, error)

func (*Queries) GetBucketPrefixMappings added in v1.4.0

func (q *Queries) GetBucketPrefixMappings(ctx context.Context, bucketName string) ([]GetBucketPrefixMappingsRow, error)

func (*Queries) GetDefaultOrganizationBucket

func (q *Queries) GetDefaultOrganizationBucket(ctx context.Context, organizationID uuid.UUID) (GetDefaultOrganizationBucketRow, error)

func (*Queries) GetExpiryLastRun added in v1.4.1

func (q *Queries) GetExpiryLastRun(ctx context.Context, arg GetExpiryLastRunParams) (ExpiryRunTracking, error)

func (*Queries) GetLongestPrefixMatch

func (q *Queries) GetLongestPrefixMatch(ctx context.Context, arg GetLongestPrefixMatchParams) (GetLongestPrefixMatchRow, error)

func (*Queries) GetLowestInstanceOrganizationBucket added in v1.3.0

func (*Queries) GetOrgConfig added in v1.7.0

func (q *Queries) GetOrgConfig(ctx context.Context, arg GetOrgConfigParams) (json.RawMessage, error)

Get config for a specific org and key. Returns NULL if not found.

func (*Queries) GetOrganization

func (q *Queries) GetOrganization(ctx context.Context, id uuid.UUID) (Organization, error)

func (*Queries) GetOrganizationAPIKeyByHash

func (q *Queries) GetOrganizationAPIKeyByHash(ctx context.Context, keyHash string) (GetOrganizationAPIKeyByHashRow, error)

func (*Queries) GetOrganizationAPIKeyByID

func (q *Queries) GetOrganizationAPIKeyByID(ctx context.Context, apiKeyID uuid.UUID) (GetOrganizationAPIKeyByIDRow, error)

func (*Queries) GetOrganizationByName

func (q *Queries) GetOrganizationByName(ctx context.Context, name string) (Organization, error)

func (*Queries) GetOrganizationExpiry added in v1.4.1

func (q *Queries) GetOrganizationExpiry(ctx context.Context, arg GetOrganizationExpiryParams) (OrganizationSignalExpiry, error)

func (*Queries) GetOrganizationsByBucket

func (q *Queries) GetOrganizationsByBucket(ctx context.Context, bucketName string) ([]uuid.UUID, error)

func (*Queries) GetStorageProfileByCollectorNameUncached

func (q *Queries) GetStorageProfileByCollectorNameUncached(ctx context.Context, organizationID pgtype.UUID) (GetStorageProfileByCollectorNameRow, error)

func (*Queries) GetStorageProfileUncached

func (q *Queries) GetStorageProfileUncached(ctx context.Context, arg GetStorageProfileParams) (GetStorageProfileRow, error)

func (*Queries) GetStorageProfilesByBucketNameUncached

func (q *Queries) GetStorageProfilesByBucketNameUncached(ctx context.Context, bucketName string) ([]GetStorageProfilesByBucketNameRow, error)

func (*Queries) HasExistingStorageProfiles

func (q *Queries) HasExistingStorageProfiles(ctx context.Context) (bool, error)

func (*Queries) ListBucketConfigurations

func (q *Queries) ListBucketConfigurations(ctx context.Context) ([]BucketConfiguration, error)

func (*Queries) ListBucketPrefixMappings

func (q *Queries) ListBucketPrefixMappings(ctx context.Context) ([]ListBucketPrefixMappingsRow, error)

func (*Queries) ListEnabledOrganizations

func (q *Queries) ListEnabledOrganizations(ctx context.Context) ([]Organization, error)

func (*Queries) ListOrgConfigs added in v1.7.0

func (q *Queries) ListOrgConfigs(ctx context.Context, organizationID uuid.UUID) ([]ListOrgConfigsRow, error)

List all config keys/values for an org.

func (*Queries) ListOrganizationAPIKeysByOrg added in v1.4.0

func (q *Queries) ListOrganizationAPIKeysByOrg(ctx context.Context, organizationID uuid.UUID) ([]ListOrganizationAPIKeysByOrgRow, error)

func (*Queries) ListOrganizationBucketsByOrg added in v1.4.0

func (q *Queries) ListOrganizationBucketsByOrg(ctx context.Context, organizationID uuid.UUID) ([]ListOrganizationBucketsByOrgRow, error)

func (*Queries) ListOrganizations

func (q *Queries) ListOrganizations(ctx context.Context) ([]Organization, error)

func (*Queries) UpsertAdminAPIKey

func (q *Queries) UpsertAdminAPIKey(ctx context.Context, arg UpsertAdminAPIKeyParams) (AdminApiKey, error)

func (*Queries) UpsertBucketConfiguration

func (q *Queries) UpsertBucketConfiguration(ctx context.Context, arg UpsertBucketConfigurationParams) (BucketConfiguration, error)

func (*Queries) UpsertExpiryRunTracking added in v1.4.1

func (q *Queries) UpsertExpiryRunTracking(ctx context.Context, arg UpsertExpiryRunTrackingParams) error

func (*Queries) UpsertOrgConfig added in v1.7.0

func (q *Queries) UpsertOrgConfig(ctx context.Context, arg UpsertOrgConfigParams) error

Insert or update a config value for an org.

func (*Queries) UpsertOrganization

func (q *Queries) UpsertOrganization(ctx context.Context, arg UpsertOrganizationParams) (Organization, error)

func (*Queries) UpsertOrganizationAPIKey

func (q *Queries) UpsertOrganizationAPIKey(ctx context.Context, arg UpsertOrganizationAPIKeyParams) (OrganizationApiKey, error)

func (*Queries) UpsertOrganizationAPIKeyMapping

func (q *Queries) UpsertOrganizationAPIKeyMapping(ctx context.Context, arg UpsertOrganizationAPIKeyMappingParams) error

func (*Queries) UpsertOrganizationBucket

func (q *Queries) UpsertOrganizationBucket(ctx context.Context, arg UpsertOrganizationBucketParams) error

func (*Queries) UpsertOrganizationExpiry added in v1.4.1

func (q *Queries) UpsertOrganizationExpiry(ctx context.Context, arg UpsertOrganizationExpiryParams) error

func (*Queries) UpsertOrganizationSync added in v1.4.0

func (q *Queries) UpsertOrganizationSync(ctx context.Context, arg UpsertOrganizationSyncParams) error

Upsert organization

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

type Store

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

Store provides all functions to execute db queries and transactions

func NewStore

func NewStore(connPool *pgxpool.Pool) *Store

NewStore creates a new Store

func (*Store) AddOrganizationBucket added in v1.4.0

func (store *Store) AddOrganizationBucket(ctx context.Context, orgID uuid.UUID, bucketName string, instanceNum int16, collectorName string) error

AddOrganizationBucket adds a bucket to an organization in a transaction

func (*Store) Close added in v1.8.0

func (s *Store) Close()

Close stops the cache background goroutines and closes the connection pool.

func (*Store) CreateBucketPrefixMappingForOrg added in v1.4.0

func (store *Store) CreateBucketPrefixMappingForOrg(ctx context.Context, bucketName string, orgID uuid.UUID, pathPrefix string, signal string) (*BucketPrefixMapping, error)

CreateBucketPrefixMappingForOrg creates a bucket prefix mapping in a transaction

func (*Store) CreateOrganizationAPIKeyWithMapping added in v1.4.0

func (store *Store) CreateOrganizationAPIKeyWithMapping(ctx context.Context, params CreateOrganizationAPIKeyParams, orgID uuid.UUID) (*OrganizationApiKey, error)

CreateOrganizationAPIKeyWithMapping creates an API key and its organization mapping in a transaction

func (*Store) DeleteOrganizationAPIKeyWithMappings added in v1.4.0

func (store *Store) DeleteOrganizationAPIKeyWithMappings(ctx context.Context, keyID uuid.UUID) error

DeleteOrganizationAPIKeyWithMappings deletes an API key and its mappings in a transaction

func (*Store) GetPool added in v1.4.0

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

GetPool returns the underlying connection pool

func (*Store) GetStorageProfile

func (store *Store) GetStorageProfile(ctx context.Context, params GetStorageProfileParams) (GetStorageProfileRow, error)

func (*Store) GetStorageProfileByCollectorName

func (store *Store) GetStorageProfileByCollectorName(ctx context.Context, organizationID uuid.UUID) (GetStorageProfileByCollectorNameRow, error)

func (*Store) GetStorageProfilesByBucketName

func (store *Store) GetStorageProfilesByBucketName(ctx context.Context, bucketName string) ([]GetStorageProfilesByBucketNameRow, error)

type StoreFull added in v1.4.0

type StoreFull interface {
	Querier
	GetStorageProfile(ctx context.Context, arg GetStorageProfileParams) (GetStorageProfileRow, error)
	GetStorageProfileByCollectorName(ctx context.Context, organizationID uuid.UUID) (GetStorageProfileByCollectorNameRow, error)
	GetStorageProfilesByBucketName(ctx context.Context, bucketName string) ([]GetStorageProfilesByBucketNameRow, error)

	// High-level transactional operations
	CreateOrganizationAPIKeyWithMapping(ctx context.Context, params CreateOrganizationAPIKeyParams, orgID uuid.UUID) (*OrganizationApiKey, error)
	DeleteOrganizationAPIKeyWithMappings(ctx context.Context, keyID uuid.UUID) error
	AddOrganizationBucket(ctx context.Context, orgID uuid.UUID, bucketName string, instanceNum int16, collectorName string) error
	CreateBucketPrefixMappingForOrg(ctx context.Context, bucketName string, orgID uuid.UUID, pathPrefix string, signal string) (*BucketPrefixMapping, error)

	// Close stops background goroutines and closes the connection pool.
	Close()
}

type UpsertAdminAPIKeyParams

type UpsertAdminAPIKeyParams struct {
	KeyHash     string  `json:"key_hash"`
	Name        string  `json:"name"`
	Description *string `json:"description"`
}

type UpsertBucketConfigurationParams

type UpsertBucketConfigurationParams struct {
	BucketName    string  `json:"bucket_name"`
	CloudProvider string  `json:"cloud_provider"`
	Region        string  `json:"region"`
	Endpoint      *string `json:"endpoint"`
	Role          *string `json:"role"`
	UsePathStyle  bool    `json:"use_path_style"`
	InsecureTls   bool    `json:"insecure_tls"`
}

type UpsertExpiryRunTrackingParams added in v1.4.1

type UpsertExpiryRunTrackingParams struct {
	OrganizationID uuid.UUID `json:"organization_id"`
	SignalType     string    `json:"signal_type"`
}

type UpsertOrgConfigParams added in v1.7.0

type UpsertOrgConfigParams struct {
	OrganizationID uuid.UUID       `json:"organization_id"`
	Key            string          `json:"key"`
	Value          json.RawMessage `json:"value"`
}

type UpsertOrganizationAPIKeyMappingParams

type UpsertOrganizationAPIKeyMappingParams struct {
	ApiKeyID       uuid.UUID `json:"api_key_id"`
	OrganizationID uuid.UUID `json:"organization_id"`
}

type UpsertOrganizationAPIKeyParams

type UpsertOrganizationAPIKeyParams struct {
	KeyHash     string  `json:"key_hash"`
	Name        string  `json:"name"`
	Description *string `json:"description"`
}

type UpsertOrganizationBucketParams

type UpsertOrganizationBucketParams struct {
	OrganizationID uuid.UUID `json:"organization_id"`
	BucketID       uuid.UUID `json:"bucket_id"`
	InstanceNum    int16     `json:"instance_num"`
	CollectorName  string    `json:"collector_name"`
}

type UpsertOrganizationExpiryParams added in v1.4.1

type UpsertOrganizationExpiryParams struct {
	OrganizationID uuid.UUID `json:"organization_id"`
	SignalType     string    `json:"signal_type"`
	MaxAgeDays     int32     `json:"max_age_days"`
}

type UpsertOrganizationParams

type UpsertOrganizationParams struct {
	ID      uuid.UUID `json:"id"`
	Name    string    `json:"name"`
	Enabled bool      `json:"enabled"`
}

type UpsertOrganizationSyncParams added in v1.4.0

type UpsertOrganizationSyncParams struct {
	ID      uuid.UUID `json:"id"`
	Name    string    `json:"name"`
	Enabled bool      `json:"enabled"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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