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

models

package
v0.0.0-...-9cfa577 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

add_profile_model.go - Add New Profile form model for Bubble Tea

config_model.go - Configuration model for Bubble Tea

gradient_logo.go - Gradient ASCII logo renderer for CycleTLS-Proxy

help_model.go - Help and documentation model for Bubble Tea

monitor_model.go - Live monitoring model for Bubble Tea

param_browser.go - Split-pane parameter browser for CycleTLS-Proxy

profile_model.go - Browser profile viewer model for Bubble Tea

Index

Constants

View Source
const (
	FieldProfileName = iota
	FieldJA4R
	FieldUserAgent
	FieldDescription
	FieldPlatform
	FieldTLSVersion
	FieldHTTPVersion
	FieldCount // Total number of fields
)

Input field indices

Variables

This section is empty.

Functions

This section is empty.

Types

type AddProfileModel

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

AddProfileModel represents the add new profile form UI

func NewAddProfileModel

func NewAddProfileModel() AddProfileModel

NewAddProfileModel creates a new add profile form model

func (AddProfileModel) Init

func (m AddProfileModel) Init() tea.Cmd

Init initializes the add profile model

func (AddProfileModel) Update

func (m AddProfileModel) Update(msg tea.Msg) (AddProfileModel, tea.Cmd)

Update handles messages for the add profile model

func (AddProfileModel) View

func (m AddProfileModel) View() string

View renders the add profile form

type BreakpointSize

type BreakpointSize int

BreakpointSize represents different terminal size categories

const (
	SizeTiny   BreakpointSize = iota // < 60 chars
	SizeSmall                        // 60-79 chars
	SizeMedium                       // 80-119 chars
	SizeLarge                        // 120-159 chars
	SizeXLarge                       // 160+ chars
)

type ConfigField

type ConfigField struct {
	Key         string
	Label       string
	Description string
	Default     string
	Validator   func(string) bool
}

ConfigField represents a configuration field

type ConfigModel

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

ConfigModel represents the configuration editor

func NewConfigModel

func NewConfigModel() ConfigModel

NewConfigModel creates a new configuration model

func (ConfigModel) Init

func (m ConfigModel) Init() tea.Cmd

Init initializes the config model

func (ConfigModel) Update

func (m ConfigModel) Update(msg tea.Msg) (ConfigModel, tea.Cmd)

Update handles messages for the config model

func (ConfigModel) View

func (m ConfigModel) View() string

View renders the config model

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

GradientLogo renders the CycleTLS logo with gradient effects

func NewGradientLogo(width, height int) *GradientLogo

NewGradientLogo creates a new gradient logo renderer

func (*GradientLogo) Render

func (g *GradientLogo) Render() string

Render returns the gradient logo as a string with responsive sizing

func (*GradientLogo) RenderCompact

func (g *GradientLogo) RenderCompact() string

RenderCompact returns a compact version for small terminals

func (*GradientLogo) RenderLarge

func (g *GradientLogo) RenderLarge() string

RenderLarge returns an enhanced logo for large terminals

func (*GradientLogo) RenderStandard

func (g *GradientLogo) RenderStandard() string

RenderStandard returns the standard logo with character-level gradients

func (*GradientLogo) RenderTiny

func (g *GradientLogo) RenderTiny() string

RenderTiny returns an ultra-compact logo for very small terminals

func (*GradientLogo) RenderWithSubtitle

func (g *GradientLogo) RenderWithSubtitle(subtitle string) string

RenderWithSubtitle adds a subtitle below the logo

func (*GradientLogo) RenderXLarge

func (g *GradientLogo) RenderXLarge() string

RenderXLarge returns the most detailed logo for extra-large terminals

type HelpModel

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

HelpModel represents the help documentation viewer

func NewHelpModel

func NewHelpModel(port string) HelpModel

NewHelpModel creates a new help model with documentation content

func (HelpModel) Init

func (m HelpModel) Init() tea.Cmd

Init initializes the help model

func (HelpModel) Update

func (m HelpModel) Update(msg tea.Msg) (HelpModel, tea.Cmd)

Update handles messages for the help model

func (HelpModel) View

func (m HelpModel) View() string

View renders the help model

type HelpSection

type HelpSection struct {
	Title   string
	Content string
}

HelpSection represents a section in the help documentation

type LegendItem

type LegendItem struct{}

LegendItem represents the complexity legend as a non-selectable list item

func (LegendItem) Description

func (l LegendItem) Description() string

Description returns the legend description

func (LegendItem) FilterValue

func (l LegendItem) FilterValue() string

FilterValue implements list.Item interface

func (LegendItem) Title

func (l LegendItem) Title() string

Title returns the legend title

type MetricsUpdateMsg

type MetricsUpdateMsg proxy.MetricsEventData

MetricsUpdateMsg contains updated server metrics

type MonitorEventMsg

type MonitorEventMsg proxy.MonitorEvent

MonitorEventMsg wraps proxy monitor events for the Bubble Tea interface

type MonitorModel

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

MonitorModel represents the live monitoring dashboard

func NewMonitorModel

func NewMonitorModel() MonitorModel

NewMonitorModel creates a new monitoring model

func NewMonitorModelWithHandler

func NewMonitorModelWithHandler(handler *proxy.Handler, monitorChannel chan proxy.MonitorEvent) MonitorModel

NewMonitorModelWithHandler creates a new monitoring model with handler reference

func (MonitorModel) Init

func (m MonitorModel) Init() tea.Cmd

Init initializes the monitor model

func (MonitorModel) Update

func (m MonitorModel) Update(msg tea.Msg) (MonitorModel, tea.Cmd)

Update handles messages for the monitor model

func (MonitorModel) View

func (m MonitorModel) View() string

View renders the monitor model

type ParamBrowserModel

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

ParamBrowserModel represents the split-pane parameter browser

func NewParamBrowserModel

func NewParamBrowserModel(port string) ParamBrowserModel

NewParamBrowserModel creates a new parameter browser model

func (ParamBrowserModel) Init

func (m ParamBrowserModel) Init() tea.Cmd

Init initializes the parameter browser model

func (ParamBrowserModel) Update

func (m ParamBrowserModel) Update(msg tea.Msg) (ParamBrowserModel, tea.Cmd)

Update handles messages for the parameter browser model

func (ParamBrowserModel) View

func (m ParamBrowserModel) View() string

View renders the parameter browser

type Parameter

type Parameter struct {
	Name            string
	Required        bool
	Desc            string
	Example         string
	CurlExample     string
	Category        string
	Complexity      string // "green", "yellow", "blue"
	ComplexityLevel int    // 1=green, 2=yellow, 3=blue
}

Parameter represents a configurable parameter

func (Parameter) Description

func (p Parameter) Description() string

Description returns the parameter description for list display

func (Parameter) FilterValue

func (p Parameter) FilterValue() string

FilterValue implements list.Item interface

func (Parameter) Title

func (p Parameter) Title() string

Title returns the parameter name for list display

type ProfileItem

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

ProfileItem represents a profile item in the list

func (ProfileItem) Description

func (i ProfileItem) Description() string

Description returns the description for display

func (ProfileItem) FilterValue

func (i ProfileItem) FilterValue() string

FilterValue returns the filter value for the item

func (ProfileItem) Title

func (i ProfileItem) Title() string

Title returns the title for display

type ProfileModel

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

ProfileModel represents the browser profile viewer with rotation selection

func NewProfileModel

func NewProfileModel(profiles map[string]fingerprints.Profile, rotator *fingerprints.ProfileRotator) ProfileModel

NewProfileModel creates a new profile browser model with rotation support

func (ProfileModel) Init

func (m ProfileModel) Init() tea.Cmd

Init initializes the profile model

func (ProfileModel) Update

func (m ProfileModel) Update(msg tea.Msg) (ProfileModel, tea.Cmd)

Update handles messages for the profile model

func (ProfileModel) View

func (m ProfileModel) View() string

View renders the profile model

type RequestLog

type RequestLog struct {
	Timestamp time.Time
	Method    string
	URL       string
	Profile   string
	Status    int
	Duration  time.Duration
	SessionID string
}

RequestLog represents a logged request

type ServerStats

type ServerStats struct {
	Uptime          time.Duration
	TotalRequests   int64
	ActiveSessions  int
	RequestsPerSec  float64
	ErrorRate       float64
	AvgResponseTime time.Duration
}

ServerStats represents server statistics

type SwitchToAddProfileMsg

type SwitchToAddProfileMsg struct{}

SwitchToAddProfileMsg is a message to request switching to add profile mode

Jump to

Keyboard shortcuts

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