Documentation
¶
Index ¶
- func Execute() error
- func SetVersion(v string)
- type APIError
- type AdminCreateResponse
- type AdminListResponse
- type AdminResponse
- type AdminRotateKeyResponse
- type AuditLogListResponse
- type AuditLogResponse
- type AuditStatsResponse
- type Client
- type Config
- type ContextDetail
- type NamedContext
- type TargetMappingListResponse
- type TargetMappingResponse
- type ValidateResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AdminCreateResponse ¶
type AdminCreateResponse struct {
Admin AdminResponse `json:"admin"`
APIKey string `json:"api_key"`
}
type AdminListResponse ¶
type AdminListResponse struct {
Data []AdminResponse `json:"data"`
Total int64 `json:"total"`
Page int `json:"page"`
PerPage int `json:"per_page"`
TotalPages int `json:"total_pages"`
}
type AdminResponse ¶
type AdminResponse struct {
ID string `json:"id"`
Email string `json:"email"`
Name string `json:"name"`
Role string `json:"role"`
IsActive bool `json:"is_active"`
LastUsedAt *string `json:"last_used_at,omitempty"`
LastUsedIP string `json:"last_used_ip,omitempty"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
type AdminRotateKeyResponse ¶
type AdminRotateKeyResponse struct {
APIKey string `json:"api_key"`
}
type AuditLogListResponse ¶
type AuditLogListResponse struct {
Data []AuditLogResponse `json:"data"`
Total int64 `json:"total"`
Page int `json:"page"`
PerPage int `json:"per_page"`
TotalPages int `json:"total_pages"`
}
type AuditLogResponse ¶
type AuditLogResponse struct {
ID string `json:"id"`
AdminID *string `json:"admin_id,omitempty"`
AdminEmail string `json:"admin_email"`
Action string `json:"action"`
ResourceType string `json:"resource_type,omitempty"`
ResourceID *string `json:"resource_id,omitempty"`
ResourceName string `json:"resource_name,omitempty"`
RequestMethod string `json:"request_method,omitempty"`
RequestPath string `json:"request_path,omitempty"`
ResponseStatus int `json:"response_status,omitempty"`
RequestBody map[string]any `json:"request_body,omitempty"`
IPAddress string `json:"ip_address,omitempty"`
UserAgent string `json:"user_agent,omitempty"`
Success bool `json:"success"`
ErrorMessage string `json:"error_message,omitempty"`
CreatedAt string `json:"created_at"`
}
type AuditStatsResponse ¶
type AuditStatsResponse struct {
Total int64 `json:"total"`
Failed24h int64 `json:"failed_24h"`
RecentActions []AuditLogResponse `json:"recent_actions"`
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the admin API HTTP client.
type Config ¶
type Config struct {
APIVersion string `yaml:"apiVersion"`
Kind string `yaml:"kind"`
CurrentContext string `yaml:"current-context"`
Contexts []NamedContext `yaml:"contexts"`
}
func (*Config) GetContext ¶
func (c *Config) GetContext(name string) *NamedContext
func (*Config) SetContext ¶
func (c *Config) SetContext(name string, ctx ContextDetail)
type ContextDetail ¶
type NamedContext ¶
type NamedContext struct {
Name string `yaml:"name"`
Context ContextDetail `yaml:"context"`
}
type TargetMappingListResponse ¶
type TargetMappingListResponse struct {
Data []TargetMappingResponse `json:"data"`
Total int64 `json:"total"`
Page int `json:"page"`
PerPage int `json:"per_page"`
TotalPages int `json:"total_pages"`
}
type TargetMappingResponse ¶
type TargetMappingResponse struct {
ID string `json:"id"`
TargetType string `json:"target_type"`
AssetType string `json:"asset_type"`
Priority int `json:"priority"`
IsActive bool `json:"is_active"`
IsPrimary bool `json:"is_primary"`
Description *string `json:"description,omitempty"`
CreatedBy *string `json:"created_by,omitempty"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
Click to show internal directories.
Click to hide internal directories.