Documentation
¶
Index ¶
- type API
- func (a *API) AddProfile(profile database.Profile) (int64, error)
- func (a *API) ClearLogs() error
- func (a *API) Close() error
- func (a *API) DeleteProfile(id int64) error
- func (a *API) GetActivityLogs() ([]database.ActivityLog, error)
- func (a *API) GetGostDebugInfo() map[string]interface{}
- func (a *API) GetGostVersion() string
- func (a *API) GetLogs() ([]LogEntry, error)
- func (a *API) GetProfile(id int64) (*database.Profile, error)
- func (a *API) GetProfiles() ([]database.Profile, error)
- func (a *API) GetRecentActivityLogs(limit int) ([]database.ActivityLog, error)
- func (a *API) GetRecentLogs(limit int) ([]LogEntry, error)
- func (a *API) IsGostAvailable() bool
- func (a *API) StartProfile(id int64) error
- func (a *API) StopProfile(id int64) error
- func (a *API) UpdateProfile(profile database.Profile) error
- type GostConfig
- type LogEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API handles the application's business logic
func (*API) AddProfile ¶
AddProfile adds a new profile
func (*API) DeleteProfile ¶
DeleteProfile deletes a profile
func (*API) GetActivityLogs ¶
func (a *API) GetActivityLogs() ([]database.ActivityLog, error)
GetActivityLogs returns all activity logs
func (*API) GetGostDebugInfo ¶
GetGostDebugInfo returns debug information about GOST detection
func (*API) GetGostVersion ¶
GetGostVersion returns the GOST version if available
func (*API) GetProfile ¶
GetProfile returns a profile by ID
func (*API) GetProfiles ¶
GetProfiles returns all profiles
func (*API) GetRecentActivityLogs ¶
func (a *API) GetRecentActivityLogs(limit int) ([]database.ActivityLog, error)
GetRecentActivityLogs returns the most recent activity logs
func (*API) GetRecentLogs ¶
GetRecentLogs returns the most recent logs
func (*API) IsGostAvailable ¶
IsGostAvailable returns whether GOST is available
type GostConfig ¶
type GostConfig struct {
Services []struct {
Name string `json:"name"`
Addr string `json:"addr"`
Handler struct {
Type string `json:"type"`
Auth struct {
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
} `json:"auth,omitempty"`
} `json:"handler"`
Forwarder struct {
Nodes []struct {
Addr string `json:"addr"`
} `json:"nodes"`
} `json:"forwarder"`
} `json:"services"`
}
GostConfig represents the GOST configuration
type LogEntry ¶
type LogEntry struct {
ID int64 `json:"id"`
Timestamp string `json:"timestamp"` // ISO 8601 format string for Wails compatibility
Level string `json:"level"` // "INFO", "WARN", "ERROR", "DEBUG"
Source string `json:"source"` // "gost", "system", "api"
Message string `json:"message"`
ProfileID *int64 `json:"profile_id,omitempty"`
ProfileName string `json:"profile_name,omitempty"`
}
LogEntry represents a log entry from GOST or system
Click to show internal directories.
Click to hide internal directories.