tailor

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	Name string
}

type Client

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

func New

func New(cfg *config.Config) (*Client, error)

func (*Client) Coverage added in v0.4.0

func (c *Client) Coverage(resources *Resources) ([]*ResolverCoverage, error)

func (*Client) Lint

func (c *Client) Lint(resources *Resources) ([]*LintWarn, error)

func (*Client) Metrics

func (c *Client) Metrics(resources *Resources) ([]Metric, error)

func (*Client) Resources

func (c *Client) Resources(ctx context.Context, opts ...ResourceOption) (*Resources, error)

type LintTargetType

type LintTargetType string
const (
	LintTargetTypePipeline  LintTargetType = "pipeline"
	LintTargetTypeTailorDB  LintTargetType = "tailordb"
	LintTargetTypeStateFlow LintTargetType = "stateflow"
)

type LintWarn

type LintWarn struct {
	Type    LintTargetType
	Name    string
	Message string
}

type Metric

type Metric struct {
	Key   string
	Name  string
	Value float64
	Unit  string
	Error error
}

type Pipeline

type Pipeline struct {
	NamespaceName string
	CommonSDL     string
	Resolvers     []*PipelineResolver
}

type PipelineResolver

type PipelineResolver struct {
	Name             string
	Description      string
	Authorization    string
	SDL              string
	PreHook          string
	PreScript        string
	PostScript       string
	PostHook         string
	Steps            []*PipelineStep
	ExecutionResults []*tailorv1.PipelineResolverExecutionResult
}

type PipelineStep

type PipelineStep struct {
	Name           string
	Description    string
	PreValidation  string
	PreScript      string
	PreHook        string
	PostScript     string
	PostValidation string
	PostHook       string
	Operation      PipelineStepOperation
}

type PipelineStepOperation

type PipelineStepOperation struct {
	Type    tailorv1.PipelineResolver_OperationType
	Name    string
	Invoker *tailorv1.AuthInvoker
	Source  string
	Test    string
}

type ResolverCoverage added in v0.4.0

type ResolverCoverage struct {
	PipelineNamespaceName string
	Name                  string
	TotalSteps            int
	CoveredSteps          int
	Steps                 []*StepCoverage
}

type ResourceOption added in v0.4.0

type ResourceOption func(*Resources) error

func WithExecutionResults added in v0.4.0

func WithExecutionResults(since *time.Time) ResourceOption

func WithoutApplications added in v0.4.0

func WithoutApplications() ResourceOption

func WithoutPipeline added in v0.4.0

func WithoutPipeline() ResourceOption

func WithoutStateFlow added in v0.4.0

func WithoutStateFlow() ResourceOption

func WithoutTailorDB added in v0.4.0

func WithoutTailorDB() ResourceOption

type Resources

type Resources struct {
	Applications []*Application
	Pipelines    []*Pipeline
	TailorDBs    []*TailorDB
	StateFlows   []*StateFlow
	// contains filtered or unexported fields
}

type StateFlow

type StateFlow struct {
	NamespaceName string
	AdminUsers    []*StateFlowAdminUser
}

type StateFlowAdminUser

type StateFlowAdminUser struct {
	UserID string
}

type StepCoverage added in v0.4.0

type StepCoverage struct {
	Name  string
	Count int
}

type TailorDB

type TailorDB struct {
	NamespaceName string
	Types         []*TailorDBType
}

type TailorDBField

type TailorDBField struct {
	Name        string
	Type        string
	Description string
	Fields      []*TailorDBField
	Required    bool
	Array       bool
	Index       bool
	Unique      bool
	ForeignKey  bool
	Vector      bool
	SourceID    *string
	Hooks       TailorDBFieldHooks
}

type TailorDBFieldHooks

type TailorDBFieldHooks struct {
	Create     string
	Update     string
	CreateExpr string
	UpdateExpr string
}

type TailorDBGQLPermission

type TailorDBGQLPermission struct {
}

type TailorDBPermission

type TailorDBPermission struct {
}

type TailorDBRecordPermission

type TailorDBRecordPermission struct {
}

type TailorDBType

type TailorDBType struct {
	Name          string
	Description   string
	Fields        []*TailorDBField
	Permission    *TailorDBPermission
	GQLPermission *TailorDBGQLPermission
	// Legacy Permission
	TypePermission   *TailorDBTypePermission
	RecordPermission *TailorDBRecordPermission
	// Draft
	Draft bool
}

type TailorDBTypePermission

type TailorDBTypePermission struct {
}

Jump to

Keyboard shortcuts

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