Documentation
¶
Index ¶
- Constants
- func FormatPayloadForDisplay(raw []byte) string
- type ApprovalResultMsg
- type AuditDataMsg
- type AuditDetailRequestMsg
- type AuditModel
- type DashboardData
- type DashboardDataMsg
- type DashboardModel
- type MetricsDataMsg
- type MetricsModel
- type PreviewRuleMsg
- type RequestDetailDataMsg
- type RequestDetailModel
- func (m *RequestDetailModel) Init() tea.Cmd
- func (m *RequestDetailModel) LoadRequest(requestID string) tea.Cmd
- func (m *RequestDetailModel) ResetGoBack()
- func (m *RequestDetailModel) SetSize(width, height int)
- func (m *RequestDetailModel) ShouldGoBack() bool
- func (m *RequestDetailModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (m *RequestDetailModel) View() string
- type RequestsDataMsg
- type RequestsModel
- type RuleActionMsg
- type RuleDetailActionMsg
- type RuleDetailDataMsg
- type RuleDetailModel
- func (m *RuleDetailModel) Init() tea.Cmd
- func (m *RuleDetailModel) LoadRule(ruleID string) tea.Cmd
- func (m *RuleDetailModel) ResetGoBack()
- func (m *RuleDetailModel) SetSize(width, height int)
- func (m *RuleDetailModel) ShouldGoBack() bool
- func (m *RuleDetailModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (m *RuleDetailModel) View() string
- type RulesDataMsg
- type RulesModel
- type SignerCreateMsg
- type SignersDataMsg
- type SignersModel
Constants ¶
const MaxPayloadDisplayRunes = 4096
MaxPayloadDisplayRunes limits how much of a payload we show in the TUI to keep rendering fast.
Variables ¶
This section is empty.
Functions ¶
func FormatPayloadForDisplay ¶ added in v0.0.2
FormatPayloadForDisplay pretty-prints JSON payload and truncates if too long.
Types ¶
type ApprovalResultMsg ¶
ApprovalResultMsg is sent when approval/rejection is complete
type AuditDataMsg ¶
type AuditDataMsg struct {
Records []client.AuditRecord
Total int
NextCursor *string
NextCursorID *string
HasMore bool
Err error
}
AuditDataMsg is sent when audit data is loaded
type AuditDetailRequestMsg ¶ added in v0.0.2
type AuditDetailRequestMsg struct {
Request *client.RequestStatus
Err error
}
AuditDetailRequestMsg is sent when the request for the selected audit record is loaded (detail view).
type AuditModel ¶
type AuditModel struct {
// contains filtered or unexported fields
}
AuditModel represents the audit logs view
func NewAuditModel ¶
func NewAuditModel(c client.ClientInterface, ctx context.Context) (*AuditModel, error)
NewAuditModel creates a new audit model
func (*AuditModel) Refresh ¶
func (m *AuditModel) Refresh() tea.Cmd
Refresh refreshes the audit data
func (*AuditModel) SetSize ¶
func (m *AuditModel) SetSize(width, height int)
SetSize sets the view size
type DashboardData ¶
type DashboardData struct {
Health *client.HealthResponse
RequestCounts map[string]int
TotalRequests int
TotalRules int
LastRefresh time.Time
}
DashboardData holds the data for the dashboard
type DashboardDataMsg ¶
type DashboardDataMsg struct {
Data *DashboardData
Err error
}
DashboardDataMsg is sent when dashboard data is loaded
type DashboardModel ¶
type DashboardModel struct {
// contains filtered or unexported fields
}
DashboardModel represents the dashboard view
func NewDashboardModel ¶
func NewDashboardModel(c client.ClientInterface, ctx context.Context) (*DashboardModel, error)
NewDashboardModel creates a new dashboard model
func (*DashboardModel) Init ¶
func (m *DashboardModel) Init() tea.Cmd
Init initializes the dashboard
func (*DashboardModel) Refresh ¶
func (m *DashboardModel) Refresh() tea.Cmd
Refresh refreshes the dashboard data
func (*DashboardModel) SetSize ¶
func (m *DashboardModel) SetSize(width, height int)
SetSize sets the view size
type MetricsDataMsg ¶ added in v0.0.2
type MetricsModel ¶ added in v0.0.2
type MetricsModel struct {
// contains filtered or unexported fields
}
func NewMetricsModel ¶ added in v0.0.2
func NewMetricsModel(c client.ClientInterface, ctx context.Context) (*MetricsModel, error)
func (*MetricsModel) Init ¶ added in v0.0.2
func (m *MetricsModel) Init() tea.Cmd
func (*MetricsModel) Refresh ¶ added in v0.0.2
func (m *MetricsModel) Refresh() tea.Cmd
func (*MetricsModel) SetSize ¶ added in v0.0.2
func (m *MetricsModel) SetSize(width, height int)
func (*MetricsModel) View ¶ added in v0.0.2
func (m *MetricsModel) View() string
type PreviewRuleMsg ¶
PreviewRuleMsg is sent when rule preview is loaded
type RequestDetailDataMsg ¶
type RequestDetailDataMsg struct {
Request *client.RequestStatus
Err error
}
RequestDetailDataMsg is sent when request detail is loaded
type RequestDetailModel ¶
type RequestDetailModel struct {
// contains filtered or unexported fields
}
RequestDetailModel represents the request detail view
func NewRequestDetailModel ¶
func NewRequestDetailModel(c client.ClientInterface, ctx context.Context) (*RequestDetailModel, error)
NewRequestDetailModel creates a new request detail model
func (*RequestDetailModel) Init ¶
func (m *RequestDetailModel) Init() tea.Cmd
Init initializes the view
func (*RequestDetailModel) LoadRequest ¶
func (m *RequestDetailModel) LoadRequest(requestID string) tea.Cmd
LoadRequest loads a request by ID
func (*RequestDetailModel) ResetGoBack ¶
func (m *RequestDetailModel) ResetGoBack()
ResetGoBack resets the go back flag
func (*RequestDetailModel) SetSize ¶
func (m *RequestDetailModel) SetSize(width, height int)
SetSize sets the view size
func (*RequestDetailModel) ShouldGoBack ¶
func (m *RequestDetailModel) ShouldGoBack() bool
ShouldGoBack returns true if the view should go back to the list
func (*RequestDetailModel) View ¶
func (m *RequestDetailModel) View() string
View renders the request detail view
type RequestsDataMsg ¶
type RequestsDataMsg struct {
Requests []client.RequestStatus
Total int
NextCursor *string
NextCursorID *string
HasMore bool
Err error
}
RequestsDataMsg is sent when requests data is loaded
type RequestsModel ¶
type RequestsModel struct {
// contains filtered or unexported fields
}
RequestsModel represents the requests list view
func NewRequestsModel ¶
func NewRequestsModel(c client.ClientInterface, ctx context.Context) (*RequestsModel, error)
NewRequestsModel creates a new requests model
func (*RequestsModel) GetSelectedRequestID ¶
func (m *RequestsModel) GetSelectedRequestID() string
GetSelectedRequestID returns the ID of the selected request
func (*RequestsModel) Init ¶
func (m *RequestsModel) Init() tea.Cmd
Init initializes the requests view
func (*RequestsModel) Refresh ¶
func (m *RequestsModel) Refresh() tea.Cmd
Refresh refreshes the requests data
func (*RequestsModel) SetSize ¶
func (m *RequestsModel) SetSize(width, height int)
SetSize sets the view size
type RuleActionMsg ¶
RuleActionMsg is sent when a rule action is complete
type RuleDetailActionMsg ¶
RuleDetailActionMsg is sent when a rule action is complete
type RuleDetailDataMsg ¶
RuleDetailDataMsg is sent when rule detail is loaded
type RuleDetailModel ¶
type RuleDetailModel struct {
// contains filtered or unexported fields
}
RuleDetailModel represents the rule detail view
func NewRuleDetailModel ¶
func NewRuleDetailModel(c client.ClientInterface, ctx context.Context) (*RuleDetailModel, error)
NewRuleDetailModel creates a new rule detail model
func (*RuleDetailModel) LoadRule ¶
func (m *RuleDetailModel) LoadRule(ruleID string) tea.Cmd
LoadRule loads a rule by ID
func (*RuleDetailModel) ResetGoBack ¶
func (m *RuleDetailModel) ResetGoBack()
ResetGoBack resets the go back flag
func (*RuleDetailModel) SetSize ¶
func (m *RuleDetailModel) SetSize(width, height int)
SetSize sets the view size
func (*RuleDetailModel) ShouldGoBack ¶
func (m *RuleDetailModel) ShouldGoBack() bool
ShouldGoBack returns true if the view should go back to the list
func (*RuleDetailModel) View ¶
func (m *RuleDetailModel) View() string
View renders the rule detail view
type RulesDataMsg ¶
RulesDataMsg is sent when rules data is loaded
type RulesModel ¶
type RulesModel struct {
// contains filtered or unexported fields
}
RulesModel represents the rules list view
func NewRulesModel ¶
func NewRulesModel(c client.ClientInterface, ctx context.Context) (*RulesModel, error)
NewRulesModel creates a new rules model
func (*RulesModel) GetSelectedRuleID ¶
func (m *RulesModel) GetSelectedRuleID() string
GetSelectedRuleID returns the ID of the selected rule
func (*RulesModel) Refresh ¶
func (m *RulesModel) Refresh() tea.Cmd
Refresh refreshes the rules data
func (*RulesModel) SetSize ¶
func (m *RulesModel) SetSize(width, height int)
SetSize sets the view size
type SignerCreateMsg ¶
SignerCreateMsg is sent when a signer is created
type SignersDataMsg ¶
SignersDataMsg is sent when signers data is loaded
type SignersModel ¶
type SignersModel struct {
// contains filtered or unexported fields
}
SignersModel represents the signers list view
func NewSignersModel ¶
func NewSignersModel(c client.ClientInterface, ctx context.Context) (*SignersModel, error)
NewSignersModel creates a new signers model
func (*SignersModel) Refresh ¶
func (m *SignersModel) Refresh() tea.Cmd
Refresh refreshes the signers data
func (*SignersModel) SetSize ¶
func (m *SignersModel) SetSize(width, height int)
SetSize sets the view size