Documentation ¶
Overview ¶
utils for creating filters and sorting parameters from query strings
Index ¶
- Variables
- func CheckWorkspaceAccess(ctx context.Context, ns string) bool
- func DereferenceComponent(ctx context.Context, client ComponentClient, cmp interface{}) (models.Component, error)
- func NewMongoClientFromConfig(config DbConfig) (*mongo.Client, error)
- func ProjectionFromBsonTags(fields []reflect.StructField) []bson.E
- type ComponentClient
- type CosmosConfig
- type DbConfig
- type DocumentKind
- type JoinOp
- type LocalStorageClientImpl
- func (c *LocalStorageClientImpl) CreateComponent(ctx context.Context, node models.Component, workspace string) error
- func (c *LocalStorageClientImpl) CreateJob(ctx context.Context, node models.Job) error
- func (c *LocalStorageClientImpl) CreateWorkflow(ctx context.Context, node models.Workflow) error
- func (c *LocalStorageClientImpl) GetComponent(ctx context.Context, id models.ComponentReference) (models.Component, error)
- func (c *LocalStorageClientImpl) GetJob(ctx context.Context, id models.ComponentReference) (models.Job, error)
- func (c *LocalStorageClientImpl) GetWorkflow(ctx context.Context, id models.ComponentReference) (models.Workflow, error)
- func (c *LocalStorageClientImpl) ListComponentsMetadata(ctx context.Context, pagination Pagination, workspaceFilter []string) ([]models.Metadata, error)
- func (c *LocalStorageClientImpl) ListJobsMetadata(ctx context.Context, pagination Pagination, workspaceFilter []string) ([]models.Metadata, error)
- func (c *LocalStorageClientImpl) ListWorkflowsMetadata(ctx context.Context, pagination Pagination, workspaceFilter []string) ([]models.Metadata, error)
- type MongoConfig
- type MongoStorageClient
- func (c *MongoStorageClient) AddJobEvents(ctx context.Context, id models.ComponentReference, events []models.JobEvent) error
- func (c *MongoStorageClient) CreateComponent(ctx context.Context, node models.Component) error
- func (c *MongoStorageClient) CreateJob(ctx context.Context, node models.Job) error
- func (c *MongoStorageClient) CreateWorkflow(ctx context.Context, node models.Workflow) error
- func (c *MongoStorageClient) DeleteDocument(ctx context.Context, kind DocumentKind, id models.CRefVersion) (models.CRefVersion, error)
- func (c *MongoStorageClient) GetAllVersions(ctx context.Context, cref models.ComponentReference, getter getCollection) ([]models.Version, error)
- func (c *MongoStorageClient) GetComponent(ctx context.Context, id interface{}) (models.Component, error)
- func (c *MongoStorageClient) GetJob(ctx context.Context, id models.ComponentReference) (models.Job, error)
- func (c *MongoStorageClient) GetLatestVersion(ctx context.Context, cref models.ComponentReference, getter getCollection) (models.Version, error)
- func (c *MongoStorageClient) GetWorkflow(ctx context.Context, id interface{}) (models.Workflow, error)
- func (c *MongoStorageClient) ListComponentVersionsMetadata(ctx context.Context, id models.ComponentReference, pagination Pagination, ...) (models.MetadataList, error)
- func (c *MongoStorageClient) ListComponentsMetadata(ctx context.Context, pagination Pagination, filterstrings []string, ...) (models.MetadataList, error)
- func (c *MongoStorageClient) ListJobsMetadata(ctx context.Context, pagination Pagination, filterstrings []string, ...) (models.MetadataWorkspaceList, error)
- func (c *MongoStorageClient) ListWorkflowVersionsMetadata(ctx context.Context, id models.ComponentReference, pagination Pagination, ...) (models.MetadataWorkspaceList, error)
- func (c *MongoStorageClient) ListWorkflowsMetadata(ctx context.Context, pagination Pagination, filterstrings []string, ...) (models.MetadataWorkspaceList, error)
- func (c *MongoStorageClient) PatchComponent(ctx context.Context, node models.Component, oldTimestamp time.Time) (models.Component, error)
- func (c *MongoStorageClient) PatchWorkflow(ctx context.Context, node models.Workflow, oldTimestamp time.Time) (models.Workflow, error)
- func (c *MongoStorageClient) PutComponent(ctx context.Context, node models.Component) error
- func (c *MongoStorageClient) PutWorkflow(ctx context.Context, node models.Workflow) error
- type MongoVolumeClientImpl
- func (c *MongoVolumeClientImpl) DeleteVolume(ctx context.Context, id models.ComponentReference) error
- func (c *MongoVolumeClientImpl) GetVolume(ctx context.Context, id models.ComponentReference) (models.FlowifyVolume, error)
- func (c *MongoVolumeClientImpl) ListVolumes(ctx context.Context, pagination Pagination, filterstrings []string, ...) (models.FlowifyVolumeList, error)
- func (c *MongoVolumeClientImpl) PutVolume(ctx context.Context, vol models.FlowifyVolume) error
- type Order
- type Pagination
- type VolumeClient
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CheckWorkspaceAccess ¶
Some of the db-accessors below require an authenticated context TODO: method should be removed and replaced by granularity access control method
func DereferenceComponent ¶
func ProjectionFromBsonTags ¶
func ProjectionFromBsonTags(fields []reflect.StructField) []bson.E
Types ¶
type ComponentClient ¶
type ComponentClient interface { ListComponentsMetadata(ctx context.Context, pagination Pagination, filters []string, sorts []string) (models.MetadataList, error) ListComponentVersionsMetadata(ctx context.Context, id models.ComponentReference, pagination Pagination, sorts []string) (models.MetadataList, error) GetComponent(ctx context.Context, id interface{}) (models.Component, error) CreateComponent(ctx context.Context, node models.Component) error PutComponent(ctx context.Context, node models.Component) error PatchComponent(ctx context.Context, node models.Component, oldTimestamp time.Time) (models.Component, error) ListWorkflowsMetadata(ctx context.Context, pagination Pagination, filter []string, sorts []string) (models.MetadataWorkspaceList, error) ListWorkflowVersionsMetadata(ctx context.Context, id models.ComponentReference, pagination Pagination, sorts []string) (models.MetadataWorkspaceList, error) GetWorkflow(ctx context.Context, id interface{}) (models.Workflow, error) CreateWorkflow(ctx context.Context, node models.Workflow) error PutWorkflow(ctx context.Context, node models.Workflow) error PatchWorkflow(ctx context.Context, node models.Workflow, oldTimestamp time.Time) (models.Workflow, error) ListJobsMetadata(ctx context.Context, pagination Pagination, filter []string, sorts []string) (models.MetadataWorkspaceList, error) GetJob(ctx context.Context, id models.ComponentReference) (models.Job, error) CreateJob(ctx context.Context, node models.Job) error DeleteDocument(ctx context.Context, kind DocumentKind, id models.CRefVersion) (models.CRefVersion, error) AddJobEvents(ctx context.Context, id models.ComponentReference, events []models.JobEvent) error }
func NewMongoStorageClient ¶
func NewMongoStorageClient(client *mongo.Client, dbname string) ComponentClient
func NewMongoStorageClientFromConfig ¶
func NewMongoStorageClientFromConfig(config DbConfig, client *mongo.Client) (ComponentClient, error)
type CosmosConfig ¶
type CosmosConfig struct { /* Credentials from azure layout: { "PrimaryMongoDBConnectionString": "...=", "PrimaryReadOnlyMongoDBConnectionString": "...=", "SecondaryMongoDBConnectionString": "...=", "SecondaryReadOnlyMongoDBConnectionString": "...=", "northeuropeEndpoint": "...", "primaryEndpoint": "...", "primaryMasterKey": "...==", "primaryReadonlyMasterKey": "...==", "secondaryMasterKey": "...==", "secondaryReadonlyMasterKey": "...==" } */ Credentials string `mapstructure:"credentials"` }
func (CosmosConfig) ConnectionString ¶
func (c CosmosConfig) ConnectionString() (string, error)
type DocumentKind ¶
type DocumentKind string
const ( JobKind DocumentKind = "job" ComponentKind DocumentKind = "component" WorkflowKind DocumentKind = "workflow" )
type LocalStorageClientImpl ¶
type LocalStorageClientImpl struct {
// contains filtered or unexported fields
}
func NewLocalNodeStorageClient ¶
func NewLocalNodeStorageClient() *LocalStorageClientImpl
func (*LocalStorageClientImpl) CreateComponent ¶
func (*LocalStorageClientImpl) CreateWorkflow ¶
func (*LocalStorageClientImpl) GetComponent ¶
func (c *LocalStorageClientImpl) GetComponent(ctx context.Context, id models.ComponentReference) (models.Component, error)
func (*LocalStorageClientImpl) GetJob ¶
func (c *LocalStorageClientImpl) GetJob(ctx context.Context, id models.ComponentReference) (models.Job, error)
jobs
func (*LocalStorageClientImpl) GetWorkflow ¶
func (c *LocalStorageClientImpl) GetWorkflow(ctx context.Context, id models.ComponentReference) (models.Workflow, error)
func (*LocalStorageClientImpl) ListComponentsMetadata ¶
func (c *LocalStorageClientImpl) ListComponentsMetadata(ctx context.Context, pagination Pagination, workspaceFilter []string) ([]models.Metadata, error)
func (*LocalStorageClientImpl) ListJobsMetadata ¶
func (c *LocalStorageClientImpl) ListJobsMetadata(ctx context.Context, pagination Pagination, workspaceFilter []string) ([]models.Metadata, error)
func (*LocalStorageClientImpl) ListWorkflowsMetadata ¶
func (c *LocalStorageClientImpl) ListWorkflowsMetadata(ctx context.Context, pagination Pagination, workspaceFilter []string) ([]models.Metadata, error)
type MongoConfig ¶
func (MongoConfig) ConnectionString ¶
func (c MongoConfig) ConnectionString() (string, error)
type MongoStorageClient ¶
type MongoStorageClient struct {
// contains filtered or unexported fields
}
func (*MongoStorageClient) AddJobEvents ¶
func (c *MongoStorageClient) AddJobEvents(ctx context.Context, id models.ComponentReference, events []models.JobEvent) error
func (*MongoStorageClient) CreateComponent ¶
func (*MongoStorageClient) CreateWorkflow ¶
func (*MongoStorageClient) DeleteDocument ¶
func (c *MongoStorageClient) DeleteDocument(ctx context.Context, kind DocumentKind, id models.CRefVersion) (models.CRefVersion, error)
func (*MongoStorageClient) GetAllVersions ¶
func (c *MongoStorageClient) GetAllVersions(ctx context.Context, cref models.ComponentReference, getter getCollection) ([]models.Version, error)
func (*MongoStorageClient) GetComponent ¶
func (*MongoStorageClient) GetJob ¶
func (c *MongoStorageClient) GetJob(ctx context.Context, id models.ComponentReference) (models.Job, error)
func (*MongoStorageClient) GetLatestVersion ¶
func (c *MongoStorageClient) GetLatestVersion(ctx context.Context, cref models.ComponentReference, getter getCollection) (models.Version, error)
func (*MongoStorageClient) GetWorkflow ¶
func (*MongoStorageClient) ListComponentVersionsMetadata ¶
func (c *MongoStorageClient) ListComponentVersionsMetadata(ctx context.Context, id models.ComponentReference, pagination Pagination, sorts []string) (models.MetadataList, error)
func (*MongoStorageClient) ListComponentsMetadata ¶
func (c *MongoStorageClient) ListComponentsMetadata(ctx context.Context, pagination Pagination, filterstrings []string, sorts []string) (models.MetadataList, error)
func (*MongoStorageClient) ListJobsMetadata ¶
func (c *MongoStorageClient) ListJobsMetadata(ctx context.Context, pagination Pagination, filterstrings []string, sorts []string) (models.MetadataWorkspaceList, error)
func (*MongoStorageClient) ListWorkflowVersionsMetadata ¶
func (c *MongoStorageClient) ListWorkflowVersionsMetadata(ctx context.Context, id models.ComponentReference, pagination Pagination, sorts []string) (models.MetadataWorkspaceList, error)
func (*MongoStorageClient) ListWorkflowsMetadata ¶
func (c *MongoStorageClient) ListWorkflowsMetadata(ctx context.Context, pagination Pagination, filterstrings []string, sorts []string) (models.MetadataWorkspaceList, error)
func (*MongoStorageClient) PatchComponent ¶
func (*MongoStorageClient) PatchWorkflow ¶
func (*MongoStorageClient) PutComponent ¶
func (*MongoStorageClient) PutWorkflow ¶
type MongoVolumeClientImpl ¶
type MongoVolumeClientImpl struct {
// contains filtered or unexported fields
}
Implements storage.VolumeClient
func (*MongoVolumeClientImpl) DeleteVolume ¶
func (c *MongoVolumeClientImpl) DeleteVolume(ctx context.Context, id models.ComponentReference) error
func (*MongoVolumeClientImpl) GetVolume ¶
func (c *MongoVolumeClientImpl) GetVolume(ctx context.Context, id models.ComponentReference) (models.FlowifyVolume, error)
func (*MongoVolumeClientImpl) ListVolumes ¶
func (c *MongoVolumeClientImpl) ListVolumes(ctx context.Context, pagination Pagination, filterstrings []string, sortstrings []string) (models.FlowifyVolumeList, error)
func (*MongoVolumeClientImpl) PutVolume ¶
func (c *MongoVolumeClientImpl) PutVolume(ctx context.Context, vol models.FlowifyVolume) error
type Pagination ¶
type VolumeClient ¶
type VolumeClient interface { ListVolumes(ctx context.Context, pagination Pagination, filters []string, sorts []string) (models.FlowifyVolumeList, error) GetVolume(ctx context.Context, id models.ComponentReference) (models.FlowifyVolume, error) PutVolume(ctx context.Context, vol models.FlowifyVolume) error DeleteVolume(ctx context.Context, id models.ComponentReference) error }
func NewMongoVolumeClientFromConfig ¶
func NewMongoVolumeClientFromConfig(config DbConfig, client *mongo.Client) (VolumeClient, error)
Click to show internal directories.
Click to hide internal directories.