Help us shape the future of Go! Take the 2026 Go Developer Survey

studio

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

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"`
	Description      string      `json:"description"`
	Method           string      `json:"method"`
	Path             string      `json:"path"`
	ReqType          string      `json:"req_type"`
	ResType          string      `json:"res_type"`
	Tags             []string    `json:"tags"`
	Node             string      `json:"node,omitempty"`
	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"`
	CacheTTLMs       int64       `json:"cache_ttl_ms,omitempty"`
	ConcurrencyLimit int32       `json:"concurrency_limit,omitempty"`
	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"`
}

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"`
	DurationFormatted string    `json:"duration_formatted"`
	Payload           any       `json:"payload,omitempty"`
	Response          any       `json:"response,omitempty"`
	Error             string    `json:"error,omitempty"`
}

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,omitempty"`
}

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) *Service

func (*Service) Actions

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

Jump to

Keyboard shortcuts

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