resource_transfer

package
v1.521.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Endpoint

type Endpoint struct {
	Scope  entities.ResourceScope `json:"scope"`
	UserID string                 `json:"user_id,omitempty"`
	TeamID string                 `json:"team_id,omitempty"`
}

type Option

type Option func(*UseCase)

func WithMemoryRepository

func WithMemoryRepository(repo portrepos.MemoryRepository) Option

func WithSandboxPolicyRepository

func WithSandboxPolicyRepository(repo portrepos.SandboxPolicyRepository) Option

func WithSessionProfileRepository

func WithSessionProfileRepository(repo portrepos.SessionProfileRepository) Option

func WithSlackBotRepository

func WithSlackBotRepository(repo portrepos.SlackBotRepository) Option

func WithTaskGroupRepository

func WithTaskGroupRepository(repo portrepos.TaskGroupRepository) Option

func WithTaskRepository

func WithTaskRepository(repo portrepos.TaskRepository) Option

func WithWebhookRepository

func WithWebhookRepository(repo portrepos.WebhookRepository) Option

type Request

type Request struct {
	ResourceType ResourceType
	ResourceID   string
	TargetScope  entities.ResourceScope
	TargetUserID string
	TargetTeamID string
	DryRun       bool
	Actor        *entities.User
}

type ResourceType

type ResourceType string
const (
	ResourceMemory         ResourceType = "memory"
	ResourceTask           ResourceType = "task"
	ResourceTaskGroup      ResourceType = "task_group"
	ResourceWebhook        ResourceType = "webhook"
	ResourceSlackBot       ResourceType = "slackbot"
	ResourceSessionProfile ResourceType = "session_profile"
	ResourceSandboxPolicy  ResourceType = "sandbox_policy"
)

type Result

type Result struct {
	ResourceType ResourceType `json:"resource_type"`
	ResourceID   string       `json:"resource_id"`
	From         Endpoint     `json:"from"`
	To           Endpoint     `json:"to"`
	Status       string       `json:"status"`
	DryRun       bool         `json:"dry_run"`
	Warnings     []string     `json:"warnings,omitempty"`
}

type UseCase

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

func New

func New(opts ...Option) *UseCase

func (*UseCase) Transfer

func (uc *UseCase) Transfer(ctx context.Context, req Request) (Result, error)

Jump to

Keyboard shortcuts

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