studio

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: Apache-2.0 Imports: 19 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionDTO

type ActionDTO struct {
	Name             string      `json:"name"`
	Kind             string      `json:"kind"`
	Description      string      `json:"description"`
	Method           string      `json:"method"`
	Path             string      `json:"path"`
	SourceFile       string      `json:"source_file,omitempty"`
	SourceLine       int         `json:"source_line,omitempty"`
	SuccessStatus    int         `json:"success_status,omitempty"`
	FlowSchemaDriven bool        `json:"flow_schema_driven,omitempty"`
	ReqSchemaName    string      `json:"request_schema,omitempty"`
	ResSchemaName    string      `json:"response_schema,omitempty"`
	ReqType          string      `json:"req_type"`
	ResType          string      `json:"res_type"`
	Tags             []string    `json:"tags"`
	Node             string      `json:"node,omitempty"`
	Category         string      `json:"category"`
	IsSystem         bool        `json:"is_system"`
	RequiresAuth     bool        `json:"requires_auth"`
	RequiredRoles    []string    `json:"required_roles,omitempty"`
	RequiredPerms    []string    `json:"required_permissions,omitempty"`
	RequiredFeatures []string    `json:"required_features,omitempty"`
	Idempotent       bool        `json:"idempotent"`
	TimeoutMs        int64       `json:"timeout_ms,omitempty"`
	RetryMax         int         `json:"retry_max,omitempty"`
	RateLimit        string      `json:"rate_limit,omitempty"`
	CacheTTLMs       int64       `json:"cache_ttl_ms,omitempty"`
	ConcurrencyLimit int32       `json:"concurrency_limit,omitempty"`
	Deduplicated     bool        `json:"deduplicated"`
	Coalesced        bool        `json:"coalesced"`
	ReqFields        []FieldMeta `json:"req_fields"`
	ResFields        []FieldMeta `json:"res_fields"`
}

type ExecuteReq

type ExecuteReq struct {
	ActionName string             `json:"action_name" validate:"required"`
	Payload    json.RawMessage    `json:"payload,omitempty"`
	Identity   *StudioIdentityDTO `json:"identity,omitempty"`
}

type ExecutionRecord

type ExecutionRecord struct {
	ID                string              `json:"id"`
	ActionName        string              `json:"action_name"`
	Timestamp         time.Time           `json:"timestamp"`
	Status            int                 `json:"status"`
	Success           bool                `json:"success"`
	DurationMs        int64               `json:"duration_ms"`
	DurationUs        int64               `json:"duration_us"`
	DurationFormatted string              `json:"duration_formatted"`
	TotalTraceUs      int64               `json:"total_trace_us"`
	Payload           any                 `json:"payload,omitempty"`
	Response          any                 `json:"response,omitempty"`
	Error             any                 `json:"error,omitempty"`
	Waterfall         []obs.CompletedSpan `json:"waterfall"`
}

type FieldMeta

type FieldMeta struct {
	Key        string `json:"key"`
	Type       string `json:"type"`
	Required   bool   `json:"required"`
	Label      string `json:"label"`
	Validation string `json:"validation,omitempty"`
	Default    any    `json:"default_value"`
}

type SecurityUniverse

type SecurityUniverse struct {
	Permissions []string `json:"permissions"`
	Roles       []string `json:"roles"`
	Features    []string `json:"features"`
	Actions     map[string]struct {
		Roles       []string `json:"roles"`
		Permissions []string `json:"permissions"`
		Features    []string `json:"features"`
	} `json:"actions"`
}

type Service

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

func NewService

func NewService(actions []action.AnyAction, reports ...*analyzer.Report) *Service

func (*Service) Actions

func (s *Service) Actions() []action.AnyAction

func (*Service) Handler added in v0.3.1

func (s *Service) Handler() http.Handler

Handler mounts the Studio UI and API action bindings on a standard HTTP handler. It can be attached to an application mux without exposing unrelated actions.

type StudioIdentityDTO added in v0.3.1

type StudioIdentityDTO struct {
	UserID      string   `json:"user_id"`
	TenantID    string   `json:"tenant_id"`
	Roles       []string `json:"roles"`
	Permissions []string `json:"permissions"`
	Features    []string `json:"features"`
}

Jump to

Keyboard shortcuts

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