Documentation
¶
Index ¶
- type ApiToken
- type AuditLog
- type CloseProjectRelationParams
- type CompleteSyncRunParams
- type CountCurrentResourcesGroupedParams
- type CountCurrentResourcesGroupedRow
- type CountCurrentResourcesRow
- type CountEventBucketsParams
- type CountEventBucketsRow
- type CountEventsForResourceParams
- type CountProjectFoldEventsParams
- type CountProjectResourcesByTypeParams
- type CountProjectResourcesByTypeRow
- type CreateAPITokenParams
- type CreateIngestCredentialParams
- type CurrentResource
- type DBTX
- type Event
- type GetCurrentResourceForUpdateParams
- type GetCurrentResourceParams
- type GetProjectRefsByIDsRow
- type GetProjectRelationParams
- type GetResourceTypeParams
- type IngestCredential
- type InsertAuditLogParams
- type InsertEventParams
- type InsertProjectParams
- type InsertProjectRelationParams
- type InsertRejectedEventParams
- type InsertSizeNameParams
- type InsertSyncRunParams
- type ListActiveAttributingRelationsParams
- type ListCurrentResourcesByCloudRow
- type ListCurrentResourcesParams
- type ListEventsForResourceParams
- type ListEventsParams
- type ListProjectFoldEventsParams
- type ListProjectFoldEventsRow
- type ListProjectRelationsParams
- type ListProjectsParams
- type ListRejectedEventsParams
- type ListRelationsValidAtParams
- type ListResourceKeysParams
- type ListResourceKeysRow
- type ListSizeNamesParams
- type ListSizeNamesRow
- type LockResourceParams
- type Project
- type ProjectRelation
- type Queries
- func (q *Queries) CloseProjectRelation(ctx context.Context, arg CloseProjectRelationParams) (int64, error)
- func (q *Queries) CompleteSyncRun(ctx context.Context, arg CompleteSyncRunParams) error
- func (q *Queries) CountCurrentResources(ctx context.Context) ([]CountCurrentResourcesRow, error)
- func (q *Queries) CountCurrentResourcesGrouped(ctx context.Context, arg CountCurrentResourcesGroupedParams) ([]CountCurrentResourcesGroupedRow, error)
- func (q *Queries) CountEventBuckets(ctx context.Context, arg CountEventBucketsParams) ([]CountEventBucketsRow, error)
- func (q *Queries) CountEventsForResource(ctx context.Context, arg CountEventsForResourceParams) (int64, error)
- func (q *Queries) CountProjectFoldEvents(ctx context.Context, arg CountProjectFoldEventsParams) (int64, error)
- func (q *Queries) CountProjectResourcesByType(ctx context.Context, arg CountProjectResourcesByTypeParams) ([]CountProjectResourcesByTypeRow, error)
- func (q *Queries) CreateAPIToken(ctx context.Context, arg CreateAPITokenParams) (uuid.UUID, error)
- func (q *Queries) CreateIngestCredential(ctx context.Context, arg CreateIngestCredentialParams) (uuid.UUID, error)
- func (q *Queries) DeleteSizeNames(ctx context.Context, cloud string) error
- func (q *Queries) GetAPITokenByTokenHash(ctx context.Context, tokenHash string) (ApiToken, error)
- func (q *Queries) GetAPITokenForUpdate(ctx context.Context, id uuid.UUID) (ApiToken, error)
- func (q *Queries) GetCurrentResource(ctx context.Context, arg GetCurrentResourceParams) (CurrentResource, error)
- func (q *Queries) GetCurrentResourceForUpdate(ctx context.Context, arg GetCurrentResourceForUpdateParams) (CurrentResource, error)
- func (q *Queries) GetIngestCredentialByTokenHash(ctx context.Context, tokenHash string) (IngestCredential, error)
- func (q *Queries) GetIngestCredentialForUpdate(ctx context.Context, id uuid.UUID) (IngestCredential, error)
- func (q *Queries) GetLastCompletedSyncStartedAt(ctx context.Context, cloud string) (pgtype.Timestamptz, error)
- func (q *Queries) GetProject(ctx context.Context, id uuid.UUID) (Project, error)
- func (q *Queries) GetProjectRefsByIDs(ctx context.Context, dollar_1 []uuid.UUID) ([]GetProjectRefsByIDsRow, error)
- func (q *Queries) GetProjectRelation(ctx context.Context, arg GetProjectRelationParams) (ProjectRelation, error)
- func (q *Queries) GetProjectsByIDs(ctx context.Context, dollar_1 []uuid.UUID) ([]Project, error)
- func (q *Queries) GetResourceType(ctx context.Context, arg GetResourceTypeParams) (ResourceType, error)
- func (q *Queries) GetSyncRun(ctx context.Context, id uuid.UUID) (SyncRun, error)
- func (q *Queries) InsertAuditLog(ctx context.Context, arg InsertAuditLogParams) error
- func (q *Queries) InsertEvent(ctx context.Context, arg InsertEventParams) (pgtype.Timestamptz, error)
- func (q *Queries) InsertProject(ctx context.Context, arg InsertProjectParams) (Project, error)
- func (q *Queries) InsertProjectRelation(ctx context.Context, arg InsertProjectRelationParams) (ProjectRelation, error)
- func (q *Queries) InsertRejectedEvent(ctx context.Context, arg InsertRejectedEventParams) error
- func (q *Queries) InsertSizeName(ctx context.Context, arg InsertSizeNameParams) error
- func (q *Queries) InsertSyncRun(ctx context.Context, arg InsertSyncRunParams) (uuid.UUID, error)
- func (q *Queries) ListActiveAttributingRelations(ctx context.Context, arg ListActiveAttributingRelationsParams) ([]ProjectRelation, error)
- func (q *Queries) ListCurrentResources(ctx context.Context, arg ListCurrentResourcesParams) ([]CurrentResource, error)
- func (q *Queries) ListCurrentResourcesByCloud(ctx context.Context, cloud string) ([]ListCurrentResourcesByCloudRow, error)
- func (q *Queries) ListEvents(ctx context.Context, arg ListEventsParams) ([]Event, error)
- func (q *Queries) ListEventsForResource(ctx context.Context, arg ListEventsForResourceParams) ([]Event, error)
- func (q *Queries) ListProjectFoldEvents(ctx context.Context, arg ListProjectFoldEventsParams) ([]ListProjectFoldEventsRow, error)
- func (q *Queries) ListProjectRelations(ctx context.Context, arg ListProjectRelationsParams) ([]ProjectRelation, error)
- func (q *Queries) ListProjects(ctx context.Context, arg ListProjectsParams) ([]Project, error)
- func (q *Queries) ListRejectedEvents(ctx context.Context, arg ListRejectedEventsParams) ([]RejectedEvent, error)
- func (q *Queries) ListRelationsValidAt(ctx context.Context, arg ListRelationsValidAtParams) ([]ProjectRelation, error)
- func (q *Queries) ListResourceKeys(ctx context.Context, arg ListResourceKeysParams) ([]ListResourceKeysRow, error)
- func (q *Queries) ListResourceTypes(ctx context.Context) ([]ResourceType, error)
- func (q *Queries) ListSizeNames(ctx context.Context, arg ListSizeNamesParams) ([]ListSizeNamesRow, error)
- func (q *Queries) LockAttributingRelations(ctx context.Context) error
- func (q *Queries) LockResource(ctx context.Context, arg LockResourceParams) error
- func (q *Queries) RevokeAPIToken(ctx context.Context, id uuid.UUID) error
- func (q *Queries) RevokeIngestCredential(ctx context.Context, id uuid.UUID) error
- func (q *Queries) TrySyncLock(ctx context.Context, dollar_1 string) (bool, error)
- func (q *Queries) UnlockSync(ctx context.Context, dollar_1 string) error
- func (q *Queries) UpdateProject(ctx context.Context, arg UpdateProjectParams) (Project, error)
- func (q *Queries) UpdateProjectRelation(ctx context.Context, arg UpdateProjectRelationParams) (ProjectRelation, error)
- func (q *Queries) UpsertCurrentResource(ctx context.Context, arg UpsertCurrentResourceParams) error
- func (q *Queries) UpsertResourceType(ctx context.Context, arg UpsertResourceTypeParams) (ResourceType, error)
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type RejectedEvent
- type ResourceType
- type SizeName
- type SyncRun
- type UpdateProjectParams
- type UpdateProjectRelationParams
- type UpsertCurrentResourceParams
- type UpsertResourceTypeParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompleteSyncRunParams ¶
type CountEventBucketsParams ¶
type CountEventBucketsParams struct {
BucketWidth string
FromTs pgtype.Timestamptz
ToTs pgtype.Timestamptz
ScopeClouds []string
ScopeProjects []string
RowCap int32
}
type CountEventBucketsRow ¶
type CountProjectFoldEventsParams ¶
type CountProjectFoldEventsParams struct {
Cloud string
ProjectID string
ToTs pgtype.Timestamptz
ProbeLimit int32
}
type CreateAPITokenParams ¶
type CurrentResource ¶
type CurrentResource struct {
Cloud string
Platform string
ResourceType string
ResourceID string
ProjectID string
State string
Size []byte
CreatedAt pgtype.Timestamptz
DeletedAt pgtype.Timestamptz
LastEventType string
LastEventAt pgtype.Timestamptz
LastPayload []byte
FirstEventAt pgtype.Timestamptz
}
type GetProjectRefsByIDsRow ¶
type GetResourceTypeParams ¶
type IngestCredential ¶
type InsertAuditLogParams ¶
type InsertEventParams ¶
type InsertProjectParams ¶
type InsertSizeNameParams ¶ added in v0.5.0
type InsertSyncRunParams ¶
type InsertSyncRunParams struct {
Cloud string
StartedAt pgtype.Timestamptz
}
type ListCurrentResourcesParams ¶
type ListCurrentResourcesParams struct {
Cloud pgtype.Text
Platform pgtype.Text
ProjectID pgtype.Text
ResourceType pgtype.Text
State pgtype.Text
Deleted pgtype.Bool
ScopeClouds []string
ScopeProjects []string
CursorCloud pgtype.Text
CursorResourceType pgtype.Text
CursorResourceID pgtype.Text
PageSize int32
}
type ListEventsParams ¶
type ListEventsParams struct {
Cloud pgtype.Text
Platform pgtype.Text
ProjectID pgtype.Text
ResourceType pgtype.Text
EventType pgtype.Text
Source pgtype.Text
FromTs pgtype.Timestamptz
ToTs pgtype.Timestamptz
ScopeClouds []string
ScopeProjects []string
CursorTs pgtype.Timestamptz
CursorEventID pgtype.Text
PageSize int32
}
type ListProjectFoldEventsParams ¶
type ListProjectFoldEventsParams struct {
Cloud string
ProjectID string
ToTs pgtype.Timestamptz
PageSize int32
}
type ListProjectsParams ¶
type ListRejectedEventsParams ¶
type ListRejectedEventsParams struct {
FromTs pgtype.Timestamptz
ToTs pgtype.Timestamptz
CursorTs pgtype.Timestamptz
CursorID pgtype.UUID
PageSize int32
}
type ListResourceKeysParams ¶
type ListResourceKeysRow ¶
type ListSizeNamesParams ¶ added in v0.5.0
type ListSizeNamesRow ¶ added in v0.5.0
type LockResourceParams ¶
type ProjectRelation ¶
type ProjectRelation struct {
ID uuid.UUID
SourceID uuid.UUID
TargetID uuid.UUID
RelationType string
Metadata []byte
ValidFrom pgtype.Timestamptz
ValidTo pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
}
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) CloseProjectRelation ¶
func (q *Queries) CloseProjectRelation(ctx context.Context, arg CloseProjectRelationParams) (int64, error)
A relation is closed rather than deleted, so that a read at an earlier instant still finds it. The row count tells the close apart from the relation that was closed already, which no longer matches.
func (*Queries) CompleteSyncRun ¶
func (q *Queries) CompleteSyncRun(ctx context.Context, arg CompleteSyncRunParams) error
func (*Queries) CountCurrentResources ¶
func (q *Queries) CountCurrentResources(ctx context.Context) ([]CountCurrentResourcesRow, error)
The fleet the projection holds, grouped the way tally_current_resources is labeled. The gauge is derived from this count rather than from the events as they are folded, so it cannot drift from the rows the API serves. Deleted resources keep their row and are counted under state 'deleted'.
func (*Queries) CountCurrentResourcesGrouped ¶
func (q *Queries) CountCurrentResourcesGrouped(ctx context.Context, arg CountCurrentResourcesGroupedParams) ([]CountCurrentResourcesGroupedRow, error)
The projection counted along all five dimensions the resource statistics can group by. The route takes any non-empty combination of them, which is thirty-one groupings and would be thirty-one static queries. A coarser grouping is the sum of these rows over the dimensions it drops, so this one query answers every combination and the handler adds the rows up in Go.
The status filter and the scope pair are the ones ListCurrentResources runs, so the counts cover the rows the list serves and nothing else.
row_cap bounds what one request materializes. Four of the five dimensions are low-cardinality, but project_id is one value per tenant, so the row set grows with the fleet's tenants rather than with the shapes it shows, and the answer is not paginated.
func (*Queries) CountEventBuckets ¶
func (q *Queries) CountEventBuckets(ctx context.Context, arg CountEventBucketsParams) ([]CountEventBucketsRow, error)
The event statistics route, as one row per bucket and group. The window is required and half-open, which is what keeps the read on the time dimension the hypertable is chunked by: a query without both bounds has every chunk there is to walk.
Both casts are there for sqlc rather than for Postgres. time_bucket is not in its catalog, so without ::timestamptz the bucket column comes out as an interface{} in the generated row; and the width reaches interval through text because a placeholder cast straight to interval generates a pgtype.Interval, where the width the route carries is a string.
row_cap bounds what one request materializes: the number of buckets grows with the window divided by the width, and each bucket carries a row per cloud, event type and source seen in it.
func (*Queries) CountEventsForResource ¶
func (q *Queries) CountEventsForResource(ctx context.Context, arg CountEventsForResourceParams) (int64, error)
How long the history above is under the same scope, counted no further than probe_limit. The unpaginated per-resource routes ask this before they read anything, because the bound they enforce is a memory bound and the read above materializes every row it returns before the caller sees the first one: deciding the refusal off the rows themselves would cost exactly the payloads the refusal exists to avoid.
The answer saturates at probe_limit, and a caller reads it as "at least this many" rather than as the length of the history. A plain count(*) cannot stop early: it would answer the bounded question of whether the history is too long by walking every event the resource has, on exactly the request the bound exists to keep cheap, and this table has no ceiling on how many that is. The inner LIMIT is what stops the walk at the only rows the decision needs.
func (*Queries) CountProjectFoldEvents ¶
func (q *Queries) CountProjectFoldEvents(ctx context.Context, arg CountProjectFoldEventsParams) (int64, error)
How many events one project summary folds, counted no further than probe_limit. The summary asks this before it runs the read below, and it counts that read's own row set rather than a narrower one: a project's own events say nothing about how long the histories they pull in are, because a resource it holds a single event of carries the events of every project it was transferred between. Counting the project's events alone would therefore bound nothing about the read, which materializes and sorts the joined set whole before the caller sees the first row. The inner LIMIT is what stops the walk at the rows the decision needs, and the answer saturates there rather than reporting how long the set is.
func (*Queries) CountProjectResourcesByType ¶
func (q *Queries) CountProjectResourcesByType(ctx context.Context, arg CountProjectResourcesByTypeParams) ([]CountProjectResourcesByTypeRow, error)
What the project summary calls active now: per resource type, the resources the projection holds for the project as it stands. It counts the present rather than the window, so a resource that was transferred away counts for its new owner and never here, whatever the window saw it do under this project. A deleted resource keeps its projection row, so it is excluded by its state rather than by its absence.
func (*Queries) CreateAPIToken ¶
func (*Queries) CreateIngestCredential ¶
func (*Queries) DeleteSizeNames ¶ added in v0.5.0
The size names of one cloud. A sync replaces them whole, the delete and the inserts in one transaction, so the ingest pipeline reads either the list of the last run or the one before it and never a mix of the two.
func (*Queries) GetAPITokenByTokenHash ¶
func (*Queries) GetAPITokenForUpdate ¶
func (*Queries) GetCurrentResource ¶
func (q *Queries) GetCurrentResource(ctx context.Context, arg GetCurrentResourceParams) (CurrentResource, error)
The read path of one projection row. It is GetCurrentResourceForUpdate without the row lock: a read must not make a writer wait on it.
func (*Queries) GetCurrentResourceForUpdate ¶
func (q *Queries) GetCurrentResourceForUpdate(ctx context.Context, arg GetCurrentResourceForUpdateParams) (CurrentResource, error)
func (*Queries) GetIngestCredentialByTokenHash ¶
func (*Queries) GetIngestCredentialForUpdate ¶
func (*Queries) GetLastCompletedSyncStartedAt ¶
func (q *Queries) GetLastCompletedSyncStartedAt(ctx context.Context, cloud string) (pgtype.Timestamptz, error)
Where an incremental sync starts. The bound is the previous run's started_at rather than its completed_at, so that the window overlaps that run and a change made while it was working cannot fall between the two.
func (*Queries) GetProject ¶
func (*Queries) GetProjectRefsByIDs ¶
func (*Queries) GetProjectRelation ¶
func (q *Queries) GetProjectRelation(ctx context.Context, arg GetProjectRelationParams) (ProjectRelation, error)
The source project is part of every single-relation key: a relation is addressed under the project it leaves, and an id that belongs to another project reads as absent rather than as someone else's row.
func (*Queries) GetProjectsByIDs ¶
The batch form of the read above, for the callers that resolve a whole set of ids at once. GetProjectRefsByIDs is the same read narrowed to the two columns an event needs.
func (*Queries) GetResourceType ¶
func (q *Queries) GetResourceType(ctx context.Context, arg GetResourceTypeParams) (ResourceType, error)
func (*Queries) GetSyncRun ¶
Reads a finished run back, for the tests that compare the stored row against the response the sync returned.
func (*Queries) InsertAuditLog ¶
func (q *Queries) InsertAuditLog(ctx context.Context, arg InsertAuditLogParams) error
func (*Queries) InsertEvent ¶
func (q *Queries) InsertEvent(ctx context.Context, arg InsertEventParams) (pgtype.Timestamptz, error)
func (*Queries) InsertProject ¶
func (*Queries) InsertProjectRelation ¶
func (q *Queries) InsertProjectRelation(ctx context.Context, arg InsertProjectRelationParams) (ProjectRelation, error)
A NULL valid_from means the relation starts when it is written, which is what a request that names no start asks for.
func (*Queries) InsertRejectedEvent ¶
func (q *Queries) InsertRejectedEvent(ctx context.Context, arg InsertRejectedEventParams) error
func (*Queries) InsertSizeName ¶ added in v0.5.0
func (q *Queries) InsertSizeName(ctx context.Context, arg InsertSizeNameParams) error
func (*Queries) InsertSyncRun ¶
The run row is written before the adapter is called, so that a run in flight can be seen while it works: status defaults to 'running' in the schema, and the row is left at that value until the run finishes.
started_at is stated by a run that was told which instant it is at, and left to now() otherwise. The told instant has to reach the column because it is the bound the next run of this cloud starts from: a told run whose row said now() would open the next window at the wall clock instead of at the instant the run reconciled.
func (*Queries) ListActiveAttributingRelations ¶
func (q *Queries) ListActiveAttributingRelations(ctx context.Context, arg ListActiveAttributingRelationsParams) ([]ProjectRelation, error)
The walk the cycle check runs, which asks about the graph as it is rather than as it stood at some instant: only the open relations of the attributing types can carry cost, so only they can close a cycle that matters.
func (*Queries) ListCurrentResources ¶
func (q *Queries) ListCurrentResources(ctx context.Context, arg ListCurrentResourcesParams) ([]CurrentResource, error)
func (*Queries) ListCurrentResourcesByCloud ¶
func (q *Queries) ListCurrentResourcesByCloud(ctx context.Context, cloud string) ([]ListCurrentResourcesByCloudRow, error)
The stored side of the reconciliation diff, in the six columns the diff reads. Deleted resources are part of the answer: one the adapter reports again has come back, and telling that apart from a first sighting needs the row. last_event_at is what a correction has to be dated past to reach the row at all: one the fold orders before it replays the history instead.
func (*Queries) ListEvents ¶
func (*Queries) ListEventsForResource ¶
func (q *Queries) ListEventsForResource(ctx context.Context, arg ListEventsForResourceParams) ([]Event, error)
The history of one resource. Two callers read it: the projection replay, which folds every event there is under no scope and no bound, and the two per-resource routes of the API, which pass both. A NULL page size is every row, which is what the replay folds.
func (*Queries) ListProjectFoldEvents ¶
func (q *Queries) ListProjectFoldEvents(ctx context.Context, arg ListProjectFoldEventsParams) ([]ListProjectFoldEventsRow, error)
The events one project summary folds: for every resource the project holds an event of, that resource's whole history up to an instant, ordered the way the per-resource history read orders.
The set is taken per resource rather than per event because a project's own events do not say when a resource left it. An ownership transfer writes the new project onto the event that moves the resource, so a slice narrowed to project_id ends at the last event before the transfer and folds into an interval that never closes, which the summary would then accrue up to the instant of the request while the new owner accrues the same resource from the transfer on. Reading each resource whole puts the transfer inside the fold, where the project every interval carries is what says whose it is. The read narrows on (cloud, resource_type, resource_id), which is what idx_events_resource leads with and whose first two columns are what the hypertable segments its compressed chunks by.
No payload is read. The fold takes state and size out of it only to split a run of intervals where the billable configuration changed, and the pieces of a split run add up to the run itself, so no number this summary reports depends on them. They are what this read would cost: the column is JSONB the schema puts no bound on, and every row of it would be unmarshalled into a map.
Only the upper bound of the window filters the read. The events before it are what says which resources the project was already running when the window opened, and the fold clips its intervals to the window itself. An event at or after the bound cannot change anything inside [from, to), so that is the one end the read can drop.
func (*Queries) ListProjectRelations ¶
func (q *Queries) ListProjectRelations(ctx context.Context, arg ListProjectRelationsParams) ([]ProjectRelation, error)
The relations of one project as they stood at one instant. The two direction flags are what the direction filter of the API comes down to: a relation counts when it leaves the project and outgoing is set, or reaches it and incoming is.
func (*Queries) ListProjects ¶
func (*Queries) ListRejectedEvents ¶
func (q *Queries) ListRejectedEvents(ctx context.Context, arg ListRejectedEventsParams) ([]RejectedEvent, error)
func (*Queries) ListRelationsValidAt ¶
func (q *Queries) ListRelationsValidAt(ctx context.Context, arg ListRelationsValidAtParams) ([]ProjectRelation, error)
The relations of a whole set of projects at one instant, for the callers that walk the graph rather than serve one project's list.
func (*Queries) ListResourceKeys ¶
func (q *Queries) ListResourceKeys(ctx context.Context, arg ListResourceKeysParams) ([]ListResourceKeysRow, error)
func (*Queries) ListResourceTypes ¶
func (q *Queries) ListResourceTypes(ctx context.Context) ([]ResourceType, error)
func (*Queries) ListSizeNames ¶ added in v0.5.0
func (q *Queries) ListSizeNames(ctx context.Context, arg ListSizeNamesParams) ([]ListSizeNamesRow, error)
What the ingest pipeline resolves an event's size against: every name stored for its cloud and resource type.
func (*Queries) LockAttributingRelations ¶
Serializes the creation of attributing relations, so that two racing inserts cannot each pass the cycle walk and leave a cycle behind.
func (*Queries) LockResource ¶
func (q *Queries) LockResource(ctx context.Context, arg LockResourceParams) error
func (*Queries) RevokeAPIToken ¶
func (*Queries) RevokeIngestCredential ¶
func (*Queries) TrySyncLock ¶
Keeps two syncs of one cloud from running at once. The lock is held for the session rather than for the transaction, as LockResource is, because a run spans several transactions.
func (*Queries) UnlockSync ¶
func (*Queries) UpdateProject ¶
A NULL parameter leaves the column as it stands, so a request that carries one field updates that field alone.
func (*Queries) UpdateProjectRelation ¶
func (q *Queries) UpdateProjectRelation(ctx context.Context, arg UpdateProjectRelationParams) (ProjectRelation, error)
func (*Queries) UpsertCurrentResource ¶
func (q *Queries) UpsertCurrentResource(ctx context.Context, arg UpsertCurrentResourceParams) error
func (*Queries) UpsertResourceType ¶
func (q *Queries) UpsertResourceType(ctx context.Context, arg UpsertResourceTypeParams) (ResourceType, error)
type RejectedEvent ¶
type ResourceType ¶
type ResourceType struct {
Platform string
ResourceType string
SizeSchema []byte
UpdatedAt pgtype.Timestamptz
}
type SyncRun ¶
type SyncRun struct {
ID uuid.UUID
Cloud string
StartedAt pgtype.Timestamptz
CompletedAt pgtype.Timestamptz
Status string
Stats []byte
}
type UpdateProjectParams ¶
type UpsertCurrentResourceParams ¶
type UpsertCurrentResourceParams struct {
Cloud string
Platform string
ResourceType string
ResourceID string
ProjectID string
State string
Size []byte
CreatedAt pgtype.Timestamptz
DeletedAt pgtype.Timestamptz
LastEventType string
LastEventAt pgtype.Timestamptz
LastPayload []byte
FirstEventAt pgtype.Timestamptz
}