scenario

package
v0.260331.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: MPL-2.0 Imports: 7 Imported by: 0 modules, 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

func RegisterRoutes

func RegisterRoutes(router *swagger.RouteGroup, handler *Handler)

RegisterRoutes registers all scenario routes with swagger documentation

Types

type Handler

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

Handler handles scenario HTTP requests

func NewHandler

func NewHandler(cfg *config.Config, rcControl RemoteControlController) *Handler

NewHandler creates a new scenario handler

func (*Handler) CreateProfile

func (h *Handler) CreateProfile(c *gin.Context)

CreateProfile creates a new profile for a base scenario

func (*Handler) DeleteProfile

func (h *Handler) DeleteProfile(c *gin.Context)

DeleteProfile deletes a profile by ID

func (*Handler) GetProfiles

func (h *Handler) GetProfiles(c *gin.Context)

GetProfiles returns all profiles for a base scenario

func (*Handler) GetScenarioConfig

func (h *Handler) GetScenarioConfig(c *gin.Context)

GetScenarioConfig returns configuration for a specific scenario

func (*Handler) GetScenarioFlag

func (h *Handler) GetScenarioFlag(c *gin.Context)

GetScenarioFlag returns a specific flag value for a scenario

func (*Handler) GetScenarioStringFlag

func (h *Handler) GetScenarioStringFlag(c *gin.Context)

GetScenarioStringFlag returns a specific string flag value for a scenario

func (*Handler) GetScenarios

func (h *Handler) GetScenarios(c *gin.Context)

GetScenarios returns all scenario configurations

func (*Handler) SetScenarioConfig

func (h *Handler) SetScenarioConfig(c *gin.Context)

SetScenarioConfig creates or updates scenario configuration

func (*Handler) SetScenarioFlag

func (h *Handler) SetScenarioFlag(c *gin.Context)

SetScenarioFlag sets a specific flag value for a scenario

func (*Handler) SetScenarioStringFlag

func (h *Handler) SetScenarioStringFlag(c *gin.Context)

SetScenarioStringFlag sets a specific string flag value for a scenario

func (*Handler) UpdateProfile

func (h *Handler) UpdateProfile(c *gin.Context)

UpdateProfile updates a profile's name

type ProfileCreateRequest

type ProfileCreateRequest struct {
	Name string `json:"name" binding:"required"`
}

ProfileCreateRequest represents the request to create or rename a profile

type RemoteControlController

type RemoteControlController interface {
	StartRemoteCoder() error
	StopRemoteCoder()
	SyncRemoteCoderBots(ctx context.Context) error
}

RemoteControlController defines the interface for controlling remote coder service

type ScenarioFlagResponse

type ScenarioFlagResponse struct {
	Success bool `json:"success" example:"true"`
	Data    struct {
		Scenario typ.RuleScenario `json:"scenario" example:"claude_code"`
		Flag     string           `json:"flag" example:"unified"`
		Value    bool             `json:"value" example:"true"`
	} `json:"data"`
}

ScenarioFlagResponse represents the response for a scenario flag

type ScenarioFlagUpdateRequest

type ScenarioFlagUpdateRequest struct {
	Value bool `json:"value"`
}

ScenarioFlagUpdateRequest represents the request to update a boolean flag

type ScenarioResponse

type ScenarioResponse struct {
	Success bool               `json:"success" example:"true"`
	Data    typ.ScenarioConfig `json:"data"`
}

ScenarioResponse represents the response for a single scenario

type ScenarioStringFlagUpdateRequest

type ScenarioStringFlagUpdateRequest struct {
	Value string `json:"value"`
}

ScenarioStringFlagUpdateRequest represents the request to update a string flag

type ScenarioUpdateRequest

type ScenarioUpdateRequest struct {
	Scenario typ.RuleScenario  `json:"scenario" binding:"required" example:"claude_code"`
	Flags    typ.ScenarioFlags `json:"flags" binding:"required"`
}

ScenarioUpdateRequest represents the request to update a scenario

type ScenarioUpdateResponse

type ScenarioUpdateResponse struct {
	Success bool               `json:"success" example:"true"`
	Message string             `json:"message" example:"Scenario config saved successfully"`
	Data    typ.ScenarioConfig `json:"data"`
}

ScenarioUpdateResponse represents the response for updating scenario

type ScenariosResponse

type ScenariosResponse struct {
	Success bool                 `json:"success" example:"true"`
	Data    []typ.ScenarioConfig `json:"data"`
}

ScenariosResponse represents the response for getting all scenarios

Jump to

Keyboard shortcuts

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