Documentation
¶
Index ¶
- type ActivityLog
- type DB
- func (db *DB) AddActivityLog(log *ActivityLog) error
- func (db *DB) AddProfile(p *Profile) error
- func (db *DB) Close() error
- func (db *DB) DeleteProfile(id int64) error
- func (db *DB) GetActivityLogs(profileID *int64) ([]ActivityLog, error)
- func (db *DB) GetProfile(id int64) (*Profile, error)
- func (db *DB) GetProfiles() ([]Profile, error)
- func (db *DB) GetRecentActivityLogs(limit int) ([]ActivityLog, error)
- func (db *DB) UpdateProfile(p *Profile) error
- type Profile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActivityLog ¶
type ActivityLog struct {
ID int64 `json:"id"`
ProfileID int64 `json:"profile_id"`
ProfileName string `json:"profile_name"`
Action string `json:"action"` // "created", "updated", "deleted", "started", "stopped"
Details string `json:"details"`
Timestamp string `json:"timestamp"` // ISO 8601 format
Status string `json:"status"` // "success", "error"
}
ActivityLog represents a profile operation log entry
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB handles database operations
func (*DB) AddActivityLog ¶
func (db *DB) AddActivityLog(log *ActivityLog) error
AddActivityLog adds a new activity log entry
func (*DB) DeleteProfile ¶
DeleteProfile deletes a profile
func (*DB) GetActivityLogs ¶
func (db *DB) GetActivityLogs(profileID *int64) ([]ActivityLog, error)
GetActivityLogs returns all activity logs, optionally filtered by profile ID
func (*DB) GetProfile ¶
GetProfile returns a profile by ID
func (*DB) GetProfiles ¶
GetProfiles returns all profiles
func (*DB) GetRecentActivityLogs ¶
func (db *DB) GetRecentActivityLogs(limit int) ([]ActivityLog, error)
GetRecentActivityLogs returns the most recent activity logs (limited count)
func (*DB) UpdateProfile ¶
UpdateProfile updates an existing profile
type Profile ¶
type Profile struct {
ID int64 `json:"id"`
Name string `json:"name"`
Type string `json:"type"` // "forward" or "reverse"
Listen string `json:"listen"`
Remote string `json:"remote"`
Username string `json:"username"`
Password string `json:"password"`
Status string `json:"status"` // "running" or "stopped"
}
Profile represents a GOST proxy profile
Click to show internal directories.
Click to hide internal directories.