Documentation
¶
Overview ¶
Package haul defines the externally-importable types and functions needed to run haul's API server, UI server and API client.
note: the following docs might be outdated, TODO before releasing v1.
### Source file descriptions
api.go defines the function for starting the API server from a parsed Config.
build.go defines the function to return the semantic version of the app registered at compile time.
client.go defines the APIClient struct and its associated API methods. It requires the injection of a voki.Voki caller to make parameterized JSON requests against an HTTP(S) server.
client_test.go defines tests for making API requests against a haul API server. Expected to be run as part of the repo's `deployments/compose/haul-acceptance/` project.
config.go defines the types and functions needed to populate a Config instance.
db.go defines the PostgresClient type and its associated method for operations against a haul PostgreSQL database.
db_test.go defines tests for a PostgresClient. Expected to be run as part of the repo's `deployments/compose/haul-acceptance` project.
entity.go defines types and constructors for the entities of haul's domain of operation. It includes struct tags on fields for their equivalence in the backing PostgreSQL database using a PostgresClient instance. See the repo's `queries/` for SQL declarations of tables, procedures, and triggers.
handler.go defines the functions called when API endpoints are hit.
response.go defines the structures of JSON HTTP responses. They are used to pass information between the HTTP API (handler.go) and the API client (client.go), which backs the UI server [ui.go], the CLI client (see the repo's `cmd/haul/`), and any custom client.
routes.go defines the functions that can declare the API surface as routes in a echo.Echo. Used by RunAPIServer.
ui.go defines the function for starting the UI server from a parsed Config.
Index ¶
- func BindAPIServerFlags(set *pflag.FlagSet) error
- func BindClientFlags(set *pflag.FlagSet) error
- func BindUIServerFlags(set *pflag.FlagSet) error
- func BindUnstableFlags(flagSet *pflag.FlagSet) error
- func CountHandler(ctx context.Context, db *PostgresClient) echo.HandlerFunc
- func CreateAssetsHandler(ctx context.Context, db *PostgresClient) echo.HandlerFunc
- func ListAssetsHandler(ctx context.Context, db *PostgresClient) echo.HandlerFunc
- func ListAssetsLabelsHandler(ctx context.Context, db *PostgresClient) echo.HandlerFunc
- func ListEventsHandler(ctx context.Context, db *PostgresClient) echo.HandlerFunc
- func ListKindsHandler(ctx context.Context, db *PostgresClient) echo.HandlerFunc
- func ListLabelsHandler(ctx context.Context, db *PostgresClient) echo.HandlerFunc
- func ListTemplatesHandler(ctx context.Context, db *PostgresClient) echo.HandlerFunc
- func NewAPIServer(ctx context.Context, cfg Config, pool *pgxpool.Pool) (*echo.Echo, error)
- func ReadAssetHandler(ctx context.Context, db *PostgresClient) echo.HandlerFunc
- func ReadHealthHandler(ctx context.Context, db *PostgresClient) echo.HandlerFunc
- func RegisterRoutes(ctx context.Context, e *echo.Echo, db *PostgresClient) error
- func RunAPIServer(ctx context.Context, cfg Config, pool *pgxpool.Pool) error
- func RunUIServer(ctx context.Context, cfg Config, stdout io.Writer) error
- func StartAPIServerFromEcho(ctx context.Context, cfg Config, e *echo.Echo) error
- func Version() string
- type APIClient
- func (c APIClient) Count(ctx context.Context) (CountResponse, error)
- func (c APIClient) CreateAssets(ctx context.Context, assets ...Asset) (CreateAssetsResponse, error)
- func (c APIClient) ListAssets(ctx context.Context, limit int) (ListAssetsResponse, error)
- func (c APIClient) ListAssetsLabels(ctx context.Context, limit int) (ListAssetsLabelsResponse, error)
- func (c APIClient) ListEvents(ctx context.Context, limit int) (ListEventsResponse, error)
- func (c APIClient) ListKinds(ctx context.Context, limit int) (ListKindsResponse, error)
- func (c APIClient) ListLabels(ctx context.Context, limit int) (ListLabelsResponse, error)
- func (c APIClient) ListTemplates(ctx context.Context, limit int) (ListTemplatesResponse, error)
- func (c APIClient) ReadAsset(ctx context.Context, assetID uuid.UUID) (ReadAssetResponse, error)
- func (c APIClient) ReadHealth(ctx context.Context) (ReadHealthResponse, error)
- type APIClientConfig
- type APIServerConfig
- type Asset
- type AssetLabel
- type AssetTemplateLabel
- type ClientConfig
- type Config
- type CountResponse
- type Counts
- type CreateAssetsResponse
- type CreateResponse
- type DeleteResponse
- type EntitiesResponseData
- type EntityResponseData
- type ErrNotImplemented
- type ErrorResponse
- type Event
- type IDResponseData
- type IDsResponseData
- type Kind
- type Label
- type ListAssetsLabelsResponse
- type ListAssetsResponse
- type ListEventsResponse
- type ListKindsResponse
- type ListLabelsResponse
- type ListResponse
- type ListTemplatesResponse
- type PostgresClient
- func (c *PostgresClient) AssignAssetLabel(ctx context.Context, assetID, labelID uuid.UUID, value string) error
- func (c *PostgresClient) AssignAssetTemplateLabel(ctx context.Context, assetID, templateID, labelID uuid.UUID, value string) error
- func (c *PostgresClient) AssignRelationAsset(ctx context.Context, relationID, assetID, purposeID uuid.UUID) error
- func (c *PostgresClient) AssignRelationLabel(ctx context.Context, relationID, labelID uuid.UUID, value string) error
- func (c *PostgresClient) AssignTemplateLabel(ctx context.Context, templateID, labelID uuid.UUID, value string) error
- func (c *PostgresClient) Count(ctx context.Context) (counts Counts, err error)
- func (c *PostgresClient) CreateAssets(ctx context.Context, assets ...Asset) ([]uuid.UUID, error)
- func (c *PostgresClient) CreateKinds(ctx context.Context, kinds ...Kind) ([]uuid.UUID, error)
- func (c *PostgresClient) CreateLabels(ctx context.Context, labels ...Label) ([]uuid.UUID, error)
- func (c *PostgresClient) CreatePurposes(ctx context.Context, purposes ...Purpose) ([]uuid.UUID, error)
- func (c *PostgresClient) CreateRelations(ctx context.Context, relations ...Relation) ([]uuid.UUID, error)
- func (c *PostgresClient) CreateTemplates(ctx context.Context, templates ...Template) ([]uuid.UUID, error)
- func (c *PostgresClient) DeleteAssets(ctx context.Context, assetIDs ...uuid.UUID) error
- func (c *PostgresClient) DeleteKinds(ctx context.Context, kindIDs ...uuid.UUID) error
- func (c *PostgresClient) DeleteLabels(ctx context.Context, labelIDs ...uuid.UUID) error
- func (c *PostgresClient) DeletePurposes(ctx context.Context, purposeIDs ...uuid.UUID) error
- func (c *PostgresClient) DeleteRelations(ctx context.Context, relationIDs ...uuid.UUID) error
- func (c *PostgresClient) DeleteTemplates(ctx context.Context, templateIDs ...uuid.UUID) error
- func (c *PostgresClient) ExecCreateSchema(ctx context.Context) error
- func (c *PostgresClient) ExecCreateTriggers(ctx context.Context) error
- func (c *PostgresClient) ExecCreateViews(ctx context.Context) error
- func (c *PostgresClient) GetAsset(ctx context.Context, id uuid.UUID) (Asset, error)
- func (c *PostgresClient) GetAssetLabel(ctx context.Context, assetID, labelID uuid.UUID) (AssetLabel, error)
- func (c *PostgresClient) GetAssetLabelValue(ctx context.Context, assetID, labelID uuid.UUID) (string, error)
- func (c *PostgresClient) GetAssetName(ctx context.Context, id uuid.UUID) (string, error)
- func (c *PostgresClient) GetAssetTemplateLabel(ctx context.Context, assetID, templateID, labelID uuid.UUID) (AssetTemplateLabel, error)
- func (c *PostgresClient) GetAssetTemplateLabelValue(ctx context.Context, assetID, templateID, labelID uuid.UUID) (string, error)
- func (c *PostgresClient) GetEvent(ctx context.Context, id uuid.UUID) (Event, error)
- func (c *PostgresClient) GetEventAt(ctx context.Context, id uuid.UUID) (*time.Time, error)
- func (c *PostgresClient) GetEventContent(ctx context.Context, id uuid.UUID) (string, error)
- func (c *PostgresClient) GetKind(ctx context.Context, id uuid.UUID) (Kind, error)
- func (c *PostgresClient) GetKindName(ctx context.Context, id uuid.UUID) (string, error)
- func (c *PostgresClient) GetKindRegex(ctx context.Context, id uuid.UUID) (string, error)
- func (c *PostgresClient) GetLabel(ctx context.Context, id uuid.UUID) (Label, error)
- func (c *PostgresClient) GetLabelKind(ctx context.Context, id uuid.UUID) (Kind, error)
- func (c *PostgresClient) GetLabelKindID(ctx context.Context, id uuid.UUID) (*uuid.UUID, error)
- func (c *PostgresClient) GetLabelName(ctx context.Context, id uuid.UUID) (string, error)
- func (c *PostgresClient) GetPurpose(ctx context.Context, id uuid.UUID) (Purpose, error)
- func (c *PostgresClient) GetPurposeName(ctx context.Context, id uuid.UUID) (string, error)
- func (c *PostgresClient) GetRelation(ctx context.Context, id uuid.UUID) (Relation, error)
- func (c *PostgresClient) GetRelationAsset(ctx context.Context, relationID, assetID, purposeID uuid.UUID) (RelationAsset, error)
- func (c *PostgresClient) GetRelationAssetPurpose(ctx context.Context, relationID, assetID uuid.UUID) (Purpose, error)
- func (c *PostgresClient) GetRelationAssetPurposeID(ctx context.Context, relationID, assetID uuid.UUID) (*uuid.UUID, error)
- func (c *PostgresClient) GetRelationLabel(ctx context.Context, relationID, labelID uuid.UUID) (RelationLabel, error)
- func (c *PostgresClient) GetRelationLabelValue(ctx context.Context, relationID, labelID uuid.UUID) (string, error)
- func (c *PostgresClient) GetRelationName(ctx context.Context, id uuid.UUID) (string, error)
- func (c *PostgresClient) GetTemplate(ctx context.Context, id uuid.UUID) (Template, error)
- func (c *PostgresClient) GetTemplateLabel(ctx context.Context, templateID, labelID uuid.UUID) (TemplateLabel, error)
- func (c *PostgresClient) GetTemplateLabelValue(ctx context.Context, templateID, labelID uuid.UUID) (string, error)
- func (c *PostgresClient) GetTemplateName(ctx context.Context, id uuid.UUID) (string, error)
- func (c *PostgresClient) Init(ctx context.Context) error
- func (c *PostgresClient) ListAssetLabels(ctx context.Context, assetID uuid.UUID, limit, offset int, filter string) ([]AssetLabel, error)
- func (c *PostgresClient) ListAssetTemplateLabels(ctx context.Context, assetID, templateID uuid.UUID, limit, offset int, ...) ([]AssetTemplateLabel, error)
- func (c *PostgresClient) ListAssetTemplatesLabels(ctx context.Context, assetID uuid.UUID, limit, offset int, filter string) ([]AssetTemplateLabel, error)
- func (c *PostgresClient) ListAssets(ctx context.Context, limit, offset int, filter string) ([]Asset, error)
- func (c *PostgresClient) ListAssetsLabels(ctx context.Context, limit, offset int, filter string) ([]AssetLabel, error)
- func (c *PostgresClient) ListAssetsTemplatesLabels(ctx context.Context, limit, offset int, filter string) ([]AssetTemplateLabel, error)
- func (c *PostgresClient) ListEvents(ctx context.Context, limit, offset int, filter string) ([]Event, error)
- func (c *PostgresClient) ListKinds(ctx context.Context, limit, offset int, filter string) ([]Kind, error)
- func (c *PostgresClient) ListLabels(ctx context.Context, limit, offset int, filter string) ([]Label, error)
- func (c *PostgresClient) ListPurposes(ctx context.Context, limit, offset int, filter string) ([]Purpose, error)
- func (c *PostgresClient) ListRelationAssets(ctx context.Context, relationID uuid.UUID, limit, offset int, filter string) ([]RelationAsset, error)
- func (c *PostgresClient) ListRelationLabels(ctx context.Context, relationID uuid.UUID, limit, offset int, filter string) ([]RelationLabel, error)
- func (c *PostgresClient) ListRelations(ctx context.Context, limit, offset int, filter string) ([]Relation, error)
- func (c *PostgresClient) ListRelationsAssets(ctx context.Context, limit, offset int, filter string) ([]RelationAsset, error)
- func (c *PostgresClient) ListRelationsLabels(ctx context.Context, limit, offset int, filter string) ([]RelationLabel, error)
- func (c *PostgresClient) ListTemplateLabels(ctx context.Context, templateID uuid.UUID, limit, offset int, filter string) ([]TemplateLabel, error)
- func (c *PostgresClient) ListTemplates(ctx context.Context, limit, offset int, filter string) ([]Template, error)
- func (c *PostgresClient) ListTemplatesLabels(ctx context.Context, limit, offset int, filter string) ([]TemplateLabel, error)
- func (c *PostgresClient) UnassignAssetLabel(ctx context.Context, assetID, labelID uuid.UUID) error
- func (c *PostgresClient) UnassignAssetTemplateLabel(ctx context.Context, assetID, templateID, labelID uuid.UUID) error
- func (c *PostgresClient) UnassignRelationAsset(ctx context.Context, relationID, assetID, purposeID uuid.UUID) error
- func (c *PostgresClient) UnassignRelationLabel(ctx context.Context, relationID, labelID uuid.UUID) error
- func (c *PostgresClient) UnassignTemplateLabel(ctx context.Context, templateID, labelID uuid.UUID) error
- func (c *PostgresClient) UnsetLabelKind(ctx context.Context, labelID uuid.UUID) error
- func (c *PostgresClient) UpdateAssetLabelValue(ctx context.Context, assetID uuid.UUID, labelID uuid.UUID, value string) error
- func (c *PostgresClient) UpdateAssetName(ctx context.Context, assetID uuid.UUID, name string) error
- func (c *PostgresClient) UpdateAssetTemplateLabelValue(ctx context.Context, assetID, templateID, labelID uuid.UUID, value string) error
- func (c *PostgresClient) UpdateKindName(ctx context.Context, kindID uuid.UUID, name string) error
- func (c *PostgresClient) UpdateKindRegex(ctx context.Context, kindID uuid.UUID, regex string) error
- func (c *PostgresClient) UpdateLabelKind(ctx context.Context, labelID, kindID uuid.UUID) error
- func (c *PostgresClient) UpdateLabelName(ctx context.Context, labelID uuid.UUID, name string) error
- func (c *PostgresClient) UpdatePurposeName(ctx context.Context, purposeID uuid.UUID, name string) error
- func (c *PostgresClient) UpdateRelationLabelValue(ctx context.Context, relationID uuid.UUID, labelID uuid.UUID, value string) error
- func (c *PostgresClient) UpdateRelationName(ctx context.Context, relationID uuid.UUID, name string) error
- func (c *PostgresClient) UpdateTemplateLabelValue(ctx context.Context, templateID uuid.UUID, labelID uuid.UUID, value string) error
- func (c *PostgresClient) UpdateTemplateName(ctx context.Context, templateID uuid.UUID, name string) error
- type PostgresConfig
- type Purpose
- type ReadAssetResponse
- type ReadHealthResponse
- type ReadResponse
- type Relation
- type RelationAsset
- type RelationLabel
- type ServerConfig
- type TLSClientConfig
- type TLSServerConfig
- type Template
- type TemplateLabel
- type UIServerConfig
- type UnstableConfig
- type UpdateResponse
- type UpdateStringFieldResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindAPIServerFlags ¶
func BindClientFlags ¶
func BindUIServerFlags ¶
func BindUnstableFlags ¶
func CountHandler ¶
func CountHandler(ctx context.Context, db *PostgresClient) echo.HandlerFunc
func CreateAssetsHandler ¶
func CreateAssetsHandler(ctx context.Context, db *PostgresClient) echo.HandlerFunc
func ListAssetsHandler ¶
func ListAssetsHandler(ctx context.Context, db *PostgresClient) echo.HandlerFunc
func ListAssetsLabelsHandler ¶ added in v0.111.0
func ListAssetsLabelsHandler(ctx context.Context, db *PostgresClient) echo.HandlerFunc
func ListEventsHandler ¶
func ListEventsHandler(ctx context.Context, db *PostgresClient) echo.HandlerFunc
func ListKindsHandler ¶
func ListKindsHandler(ctx context.Context, db *PostgresClient) echo.HandlerFunc
func ListLabelsHandler ¶ added in v0.111.0
func ListLabelsHandler(ctx context.Context, db *PostgresClient) echo.HandlerFunc
func ListTemplatesHandler ¶
func ListTemplatesHandler(ctx context.Context, db *PostgresClient) echo.HandlerFunc
func NewAPIServer ¶ added in v0.114.0
func ReadAssetHandler ¶
func ReadAssetHandler(ctx context.Context, db *PostgresClient) echo.HandlerFunc
func ReadHealthHandler ¶
func ReadHealthHandler(ctx context.Context, db *PostgresClient) echo.HandlerFunc
func RegisterRoutes ¶
func RunUIServer ¶
RunUIServer starts an instance of the web panel
It requires access to a config from which it will read the following:
- cfg.Server.Ui.Host
- cfg.Server.Ui.Password
- cfg.Server.Ui.Port
- cfg.Server.Ui.Username
Some operations also require access to an APIClient, which is built using the following config options:
- cfg.Server.Ui.Api.Host
- cfg.Server.Ui.Api.Key
- cfg.Server.Ui.Api.Port
- cfg.Server.Ui.Api.Protocol
func StartAPIServerFromEcho ¶ added in v0.114.0
Types ¶
type APIClient ¶
func (APIClient) CreateAssets ¶
func (APIClient) ListAssets ¶
func (APIClient) ListAssetsLabels ¶ added in v0.111.0
func (APIClient) ListEvents ¶
func (APIClient) ListLabels ¶ added in v0.111.0
func (APIClient) ListTemplates ¶
func (APIClient) ReadHealth ¶
func (c APIClient) ReadHealth(ctx context.Context) (ReadHealthResponse, error)
type APIClientConfig ¶
type APIClientConfig struct {
Host string
Key string
Port int
TLS TLSClientConfig
}
type APIServerConfig ¶
type APIServerConfig struct {
Host string
Key string
Port int
Postgres PostgresConfig
TLS TLSServerConfig
}
type AssetLabel ¶ added in v0.111.0
type AssetTemplateLabel ¶ added in v0.120.0
type ClientConfig ¶
type ClientConfig struct {
API APIClientConfig
OutputStyle string
}
type Config ¶
type Config struct {
Client ClientConfig
Server ServerConfig
Unstable UnstableConfig
}
func ParseConfig ¶
ParseConfig returns a Config instance filled by viper.ParseConfig
Because of viper.ParseConfig, this will parse the config file or files before parsing the command-line flags.
type CountResponse ¶
type CreateAssetsResponse ¶
type CreateAssetsResponse CreateResponse[Asset]
type CreateResponse ¶ added in v0.131.0
type CreateResponse[Entity any] struct{ Data IDsResponseData }
type DeleteResponse ¶ added in v0.131.0
type DeleteResponse[Entity any] struct{ Data IDsResponseData }
type EntitiesResponseData ¶ added in v0.131.0
type EntitiesResponseData[Entity any] struct{ Entities []Entity }
type EntityResponseData ¶ added in v0.131.0
type EntityResponseData[Entity any] struct{ Entity Entity }
type ErrNotImplemented ¶ added in v0.113.0
type ErrNotImplemented struct{}
func (ErrNotImplemented) Error ¶ added in v0.113.0
func (e ErrNotImplemented) Error() string
type ErrorResponse ¶
type ErrorResponse struct {
Error string
}
func ErrorRespondf ¶
func ErrorRespondf(format string, a ...any) ErrorResponse
type IDResponseData ¶ added in v0.131.0
type IDsResponseData ¶ added in v0.131.0
type Label ¶ added in v0.111.0
type ListAssetsLabelsResponse ¶ added in v0.111.0
type ListAssetsLabelsResponse ListResponse[AssetLabel]
type ListAssetsResponse ¶
type ListAssetsResponse ListResponse[Asset]
type ListEventsResponse ¶
type ListEventsResponse ListResponse[Event]
type ListKindsResponse ¶
type ListKindsResponse ListResponse[Kind]
type ListLabelsResponse ¶ added in v0.111.0
type ListLabelsResponse ListResponse[Label]
type ListResponse ¶ added in v0.131.0
type ListResponse[Entity any] struct{ Data EntitiesResponseData[Entity] }
type ListTemplatesResponse ¶
type ListTemplatesResponse ListResponse[Template]
type PostgresClient ¶
func (*PostgresClient) AssignAssetLabel ¶ added in v0.122.0
func (c *PostgresClient) AssignAssetLabel(ctx context.Context, assetID, labelID uuid.UUID, value string) error
asset_label_assigned
func (*PostgresClient) AssignAssetTemplateLabel ¶ added in v0.122.0
func (c *PostgresClient) AssignAssetTemplateLabel(ctx context.Context, assetID, templateID, labelID uuid.UUID, value string) error
asset_template_label_assigned
func (*PostgresClient) AssignRelationAsset ¶ added in v0.122.0
func (c *PostgresClient) AssignRelationAsset(ctx context.Context, relationID, assetID, purposeID uuid.UUID) error
relation_asset_assigned
func (*PostgresClient) AssignRelationLabel ¶ added in v0.122.0
func (c *PostgresClient) AssignRelationLabel(ctx context.Context, relationID, labelID uuid.UUID, value string) error
relation_label_assigned
func (*PostgresClient) AssignTemplateLabel ¶ added in v0.122.0
func (c *PostgresClient) AssignTemplateLabel(ctx context.Context, templateID, labelID uuid.UUID, value string) error
template_label_assigned
func (*PostgresClient) Count ¶
func (c *PostgresClient) Count(ctx context.Context) (counts Counts, err error)
func (*PostgresClient) CreateAssets ¶
asset_created
func (*PostgresClient) CreateKinds ¶ added in v0.113.0
kind_created
func (*PostgresClient) CreateLabels ¶ added in v0.113.0
label_created
func (*PostgresClient) CreatePurposes ¶ added in v0.122.0
func (c *PostgresClient) CreatePurposes(ctx context.Context, purposes ...Purpose) ([]uuid.UUID, error)
purpose_created
func (*PostgresClient) CreateRelations ¶ added in v0.122.0
func (c *PostgresClient) CreateRelations(ctx context.Context, relations ...Relation) ([]uuid.UUID, error)
relation_created
func (*PostgresClient) CreateTemplates ¶ added in v0.113.0
func (c *PostgresClient) CreateTemplates(ctx context.Context, templates ...Template) ([]uuid.UUID, error)
template_created
func (*PostgresClient) DeleteAssets ¶ added in v0.122.0
asset_deleted
func (*PostgresClient) DeleteKinds ¶ added in v0.122.0
kind_deleted
func (*PostgresClient) DeleteLabels ¶ added in v0.122.0
label_deleted
func (*PostgresClient) DeletePurposes ¶ added in v0.122.0
purpose_deleted
func (*PostgresClient) DeleteRelations ¶ added in v0.122.0
relation_deleted
func (*PostgresClient) DeleteTemplates ¶ added in v0.122.0
template_deleted
func (*PostgresClient) ExecCreateSchema ¶
func (c *PostgresClient) ExecCreateSchema(ctx context.Context) error
ExecCreateSchema creates tables from definitions in sql/schema.sql
func (*PostgresClient) ExecCreateTriggers ¶
func (c *PostgresClient) ExecCreateTriggers(ctx context.Context) error
ExecCreateTriggers creates triggers and their associated trigger function stored in sql/trigger.sql
func (*PostgresClient) ExecCreateViews ¶ added in v0.124.0
func (c *PostgresClient) ExecCreateViews(ctx context.Context) error
func (*PostgresClient) GetAssetLabel ¶ added in v0.122.0
func (c *PostgresClient) GetAssetLabel(ctx context.Context, assetID, labelID uuid.UUID) (AssetLabel, error)
func (*PostgresClient) GetAssetLabelValue ¶ added in v0.122.0
func (c *PostgresClient) GetAssetLabelValue(ctx context.Context, assetID, labelID uuid.UUID) (string, error)
GetAssetLabelValue
func (*PostgresClient) GetAssetName ¶ added in v0.122.0
func (*PostgresClient) GetAssetTemplateLabel ¶ added in v0.122.0
func (c *PostgresClient) GetAssetTemplateLabel(ctx context.Context, assetID, templateID, labelID uuid.UUID) (AssetTemplateLabel, error)
func (*PostgresClient) GetAssetTemplateLabelValue ¶ added in v0.122.0
func (c *PostgresClient) GetAssetTemplateLabelValue(ctx context.Context, assetID, templateID, labelID uuid.UUID) (string, error)
GetAssetTemplateLabelValue
func (*PostgresClient) GetEventAt ¶ added in v0.122.0
GetEventAt
func (*PostgresClient) GetEventContent ¶ added in v0.122.0
GetEventContent
func (*PostgresClient) GetKindName ¶ added in v0.122.0
func (*PostgresClient) GetKindRegex ¶ added in v0.122.0
GetKindRegex
func (*PostgresClient) GetLabelKind ¶ added in v0.122.0
GetLabelKind
func (*PostgresClient) GetLabelKindID ¶ added in v0.122.0
GetLabelKindID
func (*PostgresClient) GetLabelName ¶ added in v0.122.0
func (*PostgresClient) GetPurpose ¶ added in v0.122.0
func (*PostgresClient) GetPurposeName ¶ added in v0.122.0
func (*PostgresClient) GetRelation ¶ added in v0.122.0
func (*PostgresClient) GetRelationAsset ¶ added in v0.122.0
func (c *PostgresClient) GetRelationAsset(ctx context.Context, relationID, assetID, purposeID uuid.UUID) (RelationAsset, error)
func (*PostgresClient) GetRelationAssetPurpose ¶ added in v0.122.0
func (c *PostgresClient) GetRelationAssetPurpose(ctx context.Context, relationID, assetID uuid.UUID) (Purpose, error)
GetRelationAssetPurpose
func (*PostgresClient) GetRelationAssetPurposeID ¶ added in v0.122.0
func (c *PostgresClient) GetRelationAssetPurposeID(ctx context.Context, relationID, assetID uuid.UUID) (*uuid.UUID, error)
GetRelationAssetPurposeID
func (*PostgresClient) GetRelationLabel ¶ added in v0.122.0
func (c *PostgresClient) GetRelationLabel(ctx context.Context, relationID, labelID uuid.UUID) (RelationLabel, error)
func (*PostgresClient) GetRelationLabelValue ¶ added in v0.122.0
func (c *PostgresClient) GetRelationLabelValue(ctx context.Context, relationID, labelID uuid.UUID) (string, error)
GetRelationLabelValue
func (*PostgresClient) GetRelationName ¶ added in v0.122.0
func (*PostgresClient) GetTemplate ¶ added in v0.122.0
func (*PostgresClient) GetTemplateLabel ¶ added in v0.122.0
func (c *PostgresClient) GetTemplateLabel(ctx context.Context, templateID, labelID uuid.UUID) (TemplateLabel, error)
func (*PostgresClient) GetTemplateLabelValue ¶ added in v0.122.0
func (c *PostgresClient) GetTemplateLabelValue(ctx context.Context, templateID, labelID uuid.UUID) (string, error)
GetTemplateLabelValue
func (*PostgresClient) GetTemplateName ¶ added in v0.122.0
func (*PostgresClient) ListAssetLabels ¶ added in v0.122.0
func (c *PostgresClient) ListAssetLabels(ctx context.Context, assetID uuid.UUID, limit, offset int, filter string) ([]AssetLabel, error)
func (*PostgresClient) ListAssetTemplateLabels ¶ added in v0.122.0
func (c *PostgresClient) ListAssetTemplateLabels(ctx context.Context, assetID, templateID uuid.UUID, limit, offset int, filter string) ([]AssetTemplateLabel, error)
func (*PostgresClient) ListAssetTemplatesLabels ¶ added in v0.128.0
func (c *PostgresClient) ListAssetTemplatesLabels(ctx context.Context, assetID uuid.UUID, limit, offset int, filter string) ([]AssetTemplateLabel, error)
func (*PostgresClient) ListAssets ¶
func (c *PostgresClient) ListAssets(ctx context.Context, limit, offset int, filter string) ([]Asset, error)
API Surface asset ListAssets
func (*PostgresClient) ListAssetsLabels ¶ added in v0.111.0
func (c *PostgresClient) ListAssetsLabels(ctx context.Context, limit, offset int, filter string) ([]AssetLabel, error)
ListAssetsLabels
func (*PostgresClient) ListAssetsTemplatesLabels ¶ added in v0.123.0
func (c *PostgresClient) ListAssetsTemplatesLabels(ctx context.Context, limit, offset int, filter string) ([]AssetTemplateLabel, error)
ListAssetsTemplatesLabels
func (*PostgresClient) ListEvents ¶
func (c *PostgresClient) ListEvents(ctx context.Context, limit, offset int, filter string) ([]Event, error)
ListEvents
func (*PostgresClient) ListKinds ¶
func (c *PostgresClient) ListKinds(ctx context.Context, limit, offset int, filter string) ([]Kind, error)
ListKinds
func (*PostgresClient) ListLabels ¶ added in v0.111.0
func (c *PostgresClient) ListLabels(ctx context.Context, limit, offset int, filter string) ([]Label, error)
ListLabels
func (*PostgresClient) ListPurposes ¶ added in v0.122.0
func (c *PostgresClient) ListPurposes(ctx context.Context, limit, offset int, filter string) ([]Purpose, error)
ListPurposes
func (*PostgresClient) ListRelationAssets ¶ added in v0.117.0
func (c *PostgresClient) ListRelationAssets(ctx context.Context, relationID uuid.UUID, limit, offset int, filter string) ([]RelationAsset, error)
func (*PostgresClient) ListRelationLabels ¶ added in v0.116.2
func (c *PostgresClient) ListRelationLabels(ctx context.Context, relationID uuid.UUID, limit, offset int, filter string) ([]RelationLabel, error)
func (*PostgresClient) ListRelations ¶ added in v0.116.2
func (c *PostgresClient) ListRelations(ctx context.Context, limit, offset int, filter string) ([]Relation, error)
ListRelations
func (*PostgresClient) ListRelationsAssets ¶ added in v0.123.0
func (c *PostgresClient) ListRelationsAssets(ctx context.Context, limit, offset int, filter string) ([]RelationAsset, error)
ListRelationsAssets
func (*PostgresClient) ListRelationsLabels ¶ added in v0.123.0
func (c *PostgresClient) ListRelationsLabels(ctx context.Context, limit, offset int, filter string) ([]RelationLabel, error)
ListRelationsLabels
func (*PostgresClient) ListTemplateLabels ¶ added in v0.122.0
func (c *PostgresClient) ListTemplateLabels(ctx context.Context, templateID uuid.UUID, limit, offset int, filter string) ([]TemplateLabel, error)
func (*PostgresClient) ListTemplates ¶
func (c *PostgresClient) ListTemplates(ctx context.Context, limit, offset int, filter string) ([]Template, error)
ListTemplates
func (*PostgresClient) ListTemplatesLabels ¶ added in v0.123.0
func (c *PostgresClient) ListTemplatesLabels(ctx context.Context, limit, offset int, filter string) ([]TemplateLabel, error)
ListTemplatesLabels
func (*PostgresClient) UnassignAssetLabel ¶ added in v0.122.0
asset_label_unassigned
func (*PostgresClient) UnassignAssetTemplateLabel ¶ added in v0.122.0
func (c *PostgresClient) UnassignAssetTemplateLabel(ctx context.Context, assetID, templateID, labelID uuid.UUID) error
asset_template_label_unassigned
func (*PostgresClient) UnassignRelationAsset ¶ added in v0.122.0
func (c *PostgresClient) UnassignRelationAsset(ctx context.Context, relationID, assetID, purposeID uuid.UUID) error
relation_asset_unassigned
func (*PostgresClient) UnassignRelationLabel ¶ added in v0.122.0
func (c *PostgresClient) UnassignRelationLabel(ctx context.Context, relationID, labelID uuid.UUID) error
relation_label_unassigned
func (*PostgresClient) UnassignTemplateLabel ¶ added in v0.122.0
func (c *PostgresClient) UnassignTemplateLabel(ctx context.Context, templateID, labelID uuid.UUID) error
template_label_unassigned
func (*PostgresClient) UnsetLabelKind ¶ added in v0.128.0
label_kind_id_unset
func (*PostgresClient) UpdateAssetLabelValue ¶ added in v0.111.0
func (c *PostgresClient) UpdateAssetLabelValue(ctx context.Context, assetID uuid.UUID, labelID uuid.UUID, value string) error
asset_label_value_updated
func (*PostgresClient) UpdateAssetName ¶
asset_name_updated
func (*PostgresClient) UpdateAssetTemplateLabelValue ¶ added in v0.122.0
func (c *PostgresClient) UpdateAssetTemplateLabelValue(ctx context.Context, assetID, templateID, labelID uuid.UUID, value string) error
asset_template_label_value_updated
func (*PostgresClient) UpdateKindName ¶
kind_name_updated
func (*PostgresClient) UpdateKindRegex ¶ added in v0.111.0
kind_regex_updated
func (*PostgresClient) UpdateLabelKind ¶ added in v0.111.0
label_kind_id_updated This update triggers extensive validation of existing label values
func (*PostgresClient) UpdateLabelName ¶ added in v0.111.0
label_name_updated
func (*PostgresClient) UpdatePurposeName ¶ added in v0.122.0
func (c *PostgresClient) UpdatePurposeName(ctx context.Context, purposeID uuid.UUID, name string) error
purpose_name_updated
func (*PostgresClient) UpdateRelationLabelValue ¶ added in v0.122.0
func (c *PostgresClient) UpdateRelationLabelValue(ctx context.Context, relationID uuid.UUID, labelID uuid.UUID, value string) error
relation_label_value_updated
func (*PostgresClient) UpdateRelationName ¶ added in v0.122.0
func (c *PostgresClient) UpdateRelationName(ctx context.Context, relationID uuid.UUID, name string) error
relation_name_updated
func (*PostgresClient) UpdateTemplateLabelValue ¶ added in v0.122.0
func (c *PostgresClient) UpdateTemplateLabelValue(ctx context.Context, templateID uuid.UUID, labelID uuid.UUID, value string) error
template_label_value_updated
func (*PostgresClient) UpdateTemplateName ¶ added in v0.122.0
func (c *PostgresClient) UpdateTemplateName(ctx context.Context, templateID uuid.UUID, name string) error
template_name_updated
type PostgresConfig ¶
type Purpose ¶ added in v0.120.0
func NewPurpose ¶ added in v0.120.0
type ReadAssetResponse ¶
type ReadAssetResponse ReadResponse[Asset]
type ReadHealthResponse ¶
type ReadResponse ¶ added in v0.131.0
type ReadResponse[Entity any] struct{ Data EntityResponseData[Entity] }
type Relation ¶ added in v0.116.0
func NewRelation ¶ added in v0.116.0
type RelationAsset ¶ added in v0.117.0
type RelationLabel ¶ added in v0.116.0
type ServerConfig ¶
type ServerConfig struct {
API APIServerConfig
UI UIServerConfig
}
type TLSClientConfig ¶
type TLSServerConfig ¶
type Template ¶
func NewTemplate ¶
type TemplateLabel ¶ added in v0.120.0
type UIServerConfig ¶
type UIServerConfig struct {
API APIClientConfig
Host string
Password string
Port int
TLS TLSServerConfig
Username string
}
type UnstableConfig ¶
type UnstableConfig struct {
Postgres PostgresConfig
}
type UpdateResponse ¶ added in v0.131.0
type UpdateResponse[Entity any] struct{ Data IDsResponseData }
type UpdateStringFieldResponse ¶ added in v0.131.0
type UpdateStringFieldResponse[Entity any] struct{ Data IDsResponseData }