components

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationPackagesOptions

type ApplicationPackagesOptions struct{}

type ApplicationPackagesView

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

func NewApplicationPackagesView

func NewApplicationPackagesView(connectionManager *snowflake.ConnectionManager, opts *ApplicationPackagesOptions) *ApplicationPackagesView

func (*ApplicationPackagesView) GetBindings

func (t *ApplicationPackagesView) GetBindings(ctx context.Context, applicationState *ApplicationState) []*KeyBinding

func (*ApplicationPackagesView) GetRender

func (v *ApplicationPackagesView) GetRender() tview.Primitive

func (*ApplicationPackagesView) Update

type ApplicationState

type ApplicationState struct {

	// snowflake client
	ConnectionManager *snowflake.ConnectionManager

	Application *tview.Application
	Pages       *tview.Pages
	Main        *tview.Pages
	// contains filtered or unexported fields
}

func (*ApplicationState) Pop

func (a *ApplicationState) Pop(ctx context.Context)

func (*ApplicationState) Push

func (a *ApplicationState) Push(ctx context.Context, component Component)

func (*ApplicationState) UpdateView

func (a *ApplicationState) UpdateView(ctx context.Context, newPage bool)

type ApplicationsOptions

type ApplicationsOptions struct{}

type ApplicationsView

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

func NewApplicationsView

func NewApplicationsView(connectionManager *snowflake.ConnectionManager, opts *ApplicationsOptions) *ApplicationsView

func (*ApplicationsView) GetBindings

func (t *ApplicationsView) GetBindings(ctx context.Context, applicationState *ApplicationState) []*KeyBinding

func (*ApplicationsView) GetRender

func (v *ApplicationsView) GetRender() tview.Primitive

func (*ApplicationsView) Update

func (v *ApplicationsView) Update(ctx context.Context) error

type Component

type Component interface {
	GetBindings(ctx context.Context, applicationState *ApplicationState) []*KeyBinding
	GetRender() tview.Primitive
	Update(ctx context.Context) error
}

type ComputePoolsOptions

type ComputePoolsOptions struct{}

type ComputePoolsView

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

func NewComputePoolsView

func NewComputePoolsView(connectionManager *snowflake.ConnectionManager, opts *ComputePoolsOptions) *ComputePoolsView

func (*ComputePoolsView) GetBindings

func (v *ComputePoolsView) GetBindings(ctx context.Context, applicationState *ApplicationState) []*KeyBinding

func (*ComputePoolsView) GetRender

func (v *ComputePoolsView) GetRender() tview.Primitive

func (*ComputePoolsView) Update

func (v *ComputePoolsView) Update(ctx context.Context) error

type ConfirmModal

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

func NewConfirmModal

func NewConfirmModal() *ConfirmModal

func (*ConfirmModal) GetRender

func (m *ConfirmModal) GetRender() *tview.Modal

func (*ConfirmModal) Prompt

func (m *ConfirmModal) Prompt(ctx context.Context, applicationState *ApplicationState, message string, confirm func(action bool))

type ConnectionsOptions

type ConnectionsOptions struct {
}

type ConnectionsView

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

func NewConnectionsView

func NewConnectionsView(connectionManager *snowflake.ConnectionManager, opts *ConnectionsOptions) *ConnectionsView

func (*ConnectionsView) GetBindings

func (t *ConnectionsView) GetBindings(ctx context.Context, applicationState *ApplicationState) []*KeyBinding

func (*ConnectionsView) GetRender

func (v *ConnectionsView) GetRender() tview.Primitive

func (*ConnectionsView) Update

func (v *ConnectionsView) Update(ctx context.Context) error

type DatabasesOptions

type DatabasesOptions struct{}

type DatabasesView

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

func NewDatabasesView

func NewDatabasesView(connectionManager *snowflake.ConnectionManager, opts *DatabasesOptions) *DatabasesView

func (*DatabasesView) GetBindings

func (v *DatabasesView) GetBindings(ctx context.Context, applicationState *ApplicationState) []*KeyBinding

func (*DatabasesView) GetRender

func (v *DatabasesView) GetRender() tview.Primitive

func (*DatabasesView) Update

func (v *DatabasesView) Update(ctx context.Context) error

type EndpointsOptions

type EndpointsOptions struct {
	Service *sdk.SchemaObjectIdentifier
}

type EndpointsView

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

func NewEndpointsView

func NewEndpointsView(connectionManager *snowflake.ConnectionManager, opts *EndpointsOptions) *EndpointsView

func (*EndpointsView) GetBindings

func (v *EndpointsView) GetBindings(ctx context.Context, applicationState *ApplicationState) []*KeyBinding

func (*EndpointsView) GetRender

func (v *EndpointsView) GetRender() tview.Primitive

func (*EndpointsView) Update

func (v *EndpointsView) Update(ctx context.Context) error

type GrantsOptions

type GrantsOptions struct {
	ObjectType       sdk.ObjectType
	ObjectIdentifier sdk.ObjectIdentifier
}

type GrantsView

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

func NewGrantsView

func NewGrantsView(connectionManager *snowflake.ConnectionManager, opts *GrantsOptions) *GrantsView

func (*GrantsView) GetBindings

func (v *GrantsView) GetBindings(ctx context.Context, applicationState *ApplicationState) []*KeyBinding

func (*GrantsView) GetRender

func (v *GrantsView) GetRender() tview.Primitive

func (*GrantsView) Update

func (v *GrantsView) Update(ctx context.Context) error

type ImageRepositoriesOptions

type ImageRepositoriesOptions struct {
	Database *sdk.AccountObjectIdentifier
	Schema   *sdk.DatabaseObjectIdentifier
}

type ImageRepositoriesView

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

func NewImageRepositoriesView

func NewImageRepositoriesView(connectionManager *snowflake.ConnectionManager, opts *ImageRepositoriesOptions) *ImageRepositoriesView

func (*ImageRepositoriesView) GetBindings

func (v *ImageRepositoriesView) GetBindings(ctx context.Context, applicationState *ApplicationState) []*KeyBinding

func (*ImageRepositoriesView) GetRender

func (v *ImageRepositoriesView) GetRender() tview.Primitive

func (*ImageRepositoriesView) Update

func (v *ImageRepositoriesView) Update(ctx context.Context) error

type KeyBinding

type KeyBinding struct {
	Description string
	Event       *tcell.EventKey
	Hidden      bool
	Rune        rune
	Callback    func(event *tcell.EventKey) *tcell.EventKey
}

func (*KeyBinding) Name

func (k *KeyBinding) Name() string

type KeyBindings

type KeyBindings struct {
	Bindings []*KeyBinding
	// contains filtered or unexported fields
}

func NewKeyBindings

func NewKeyBindings() *KeyBindings

func (*KeyBindings) Add

func (k *KeyBindings) Add(binding *KeyBinding)

func (*KeyBindings) Clear

func (k *KeyBindings) Clear()

func (*KeyBindings) GetRender

func (k *KeyBindings) GetRender() *tview.Table

func (*KeyBindings) Update

func (k *KeyBindings) Update()

type ListingsOptions

type ListingsOptions struct {
}

type ListingsView

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

func NewListingsView

func NewListingsView(connectionManager *snowflake.ConnectionManager, opts *ListingsOptions) *ListingsView

func (*ListingsView) GetBindings

func (v *ListingsView) GetBindings(ctx context.Context, applicationState *ApplicationState) []*KeyBinding

func (*ListingsView) GetRender

func (v *ListingsView) GetRender() tview.Primitive

func (*ListingsView) Update

func (v *ListingsView) Update(ctx context.Context) error

type NetworkPoliciesOptions

type NetworkPoliciesOptions struct {
}

type NetworkPoliciesView

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

func NewNetworkPoliciesView

func NewNetworkPoliciesView(connectionManager *snowflake.ConnectionManager, opts *NetworkPoliciesOptions) *NetworkPoliciesView

func (*NetworkPoliciesView) GetBindings

func (v *NetworkPoliciesView) GetBindings(ctx context.Context, applicationState *ApplicationState) []*KeyBinding

func (*NetworkPoliciesView) GetRender

func (v *NetworkPoliciesView) GetRender() tview.Primitive

func (*NetworkPoliciesView) Update

func (v *NetworkPoliciesView) Update(ctx context.Context) error

type NetworkRulesOptions

type NetworkRulesOptions struct {
	Database *sdk.AccountObjectIdentifier
	Schema   *sdk.DatabaseObjectIdentifier
}

type NetworkRulesView

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

func NewNetworkRulesView

func NewNetworkRulesView(connectionManager *snowflake.ConnectionManager, opts *NetworkRulesOptions) *NetworkRulesView

func (*NetworkRulesView) GetBindings

func (v *NetworkRulesView) GetBindings(ctx context.Context, applicationState *ApplicationState) []*KeyBinding

func (*NetworkRulesView) GetRender

func (v *NetworkRulesView) GetRender() tview.Primitive

func (*NetworkRulesView) Update

func (v *NetworkRulesView) Update(ctx context.Context) error

type ProceduresOptions

type ProceduresOptions struct {
	Database *sdk.AccountObjectIdentifier
	Schema   *sdk.DatabaseObjectIdentifier
}

type ProceduresView

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

func NewProceduresView

func NewProceduresView(connectionManager *snowflake.ConnectionManager, opts *ProceduresOptions) *ProceduresView

func (*ProceduresView) GetBindings

func (v *ProceduresView) GetBindings(ctx context.Context, applicationState *ApplicationState) []*KeyBinding

func (*ProceduresView) GetRender

func (v *ProceduresView) GetRender() tview.Primitive

func (*ProceduresView) Update

func (v *ProceduresView) Update(ctx context.Context) error

type ReleaseDirectivesOptions

type ReleaseDirectivesOptions struct {
	ApplicationPackage *sdk.AccountObjectIdentifier
}

type ReleaseDirectivesView

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

func NewReleaseDirectivesView

func NewReleaseDirectivesView(connectionManager *snowflake.ConnectionManager, opts *ReleaseDirectivesOptions) *ReleaseDirectivesView

func (*ReleaseDirectivesView) GetBindings

func (v *ReleaseDirectivesView) GetBindings(ctx context.Context, applicationState *ApplicationState) []*KeyBinding

func (*ReleaseDirectivesView) GetRender

func (v *ReleaseDirectivesView) GetRender() tview.Primitive

func (*ReleaseDirectivesView) Update

func (v *ReleaseDirectivesView) Update(ctx context.Context) error

type RolesOptions

type RolesOptions struct{}

type RolesView

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

func NewRolesView

func NewRolesView(connectionManager *snowflake.ConnectionManager, opts *RolesOptions) *RolesView

func (*RolesView) GetBindings

func (v *RolesView) GetBindings(ctx context.Context, applicationState *ApplicationState) []*KeyBinding

func (*RolesView) GetRender

func (v *RolesView) GetRender() tview.Primitive

func (*RolesView) Update

func (v *RolesView) Update(ctx context.Context) error

type SchemasOptions

type SchemasOptions struct {
	Database *string
}

type SchemasView

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

func NewSchemasView

func NewSchemasView(connectionManager *snowflake.ConnectionManager, opts *SchemasOptions) *SchemasView

func (*SchemasView) GetBindings

func (v *SchemasView) GetBindings(ctx context.Context, applicationState *ApplicationState) []*KeyBinding

func (*SchemasView) GetRender

func (v *SchemasView) GetRender() tview.Primitive

func (*SchemasView) Update

func (v *SchemasView) Update(ctx context.Context) error
type Search struct {
	// contains filtered or unexported fields
}

func NewSearch

func NewSearch() *Search

func (*Search) Clear

func (s *Search) Clear()

func (*Search) GetBindings

func (s *Search) GetBindings(ctx context.Context, applicationState *ApplicationState) []*KeyBinding

func (*Search) GetRender

func (s *Search) GetRender() *tview.InputField

func (*Search) Value

func (s *Search) Value() string

type SecretsOptions

type SecretsOptions struct {
	Database           *sdk.AccountObjectIdentifier
	Schema             *sdk.DatabaseObjectIdentifier
	Application        *sdk.AccountObjectIdentifier
	ApplicationPackage *sdk.AccountObjectIdentifier
}

type SecretsView

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

func NewSecretsView

func NewSecretsView(connectionManager *snowflake.ConnectionManager, opts *SecretsOptions) *SecretsView

func (*SecretsView) GetBindings

func (v *SecretsView) GetBindings(ctx context.Context, applicationState *ApplicationState) []*KeyBinding

func (*SecretsView) GetRender

func (v *SecretsView) GetRender() tview.Primitive

func (*SecretsView) Update

func (v *SecretsView) Update(ctx context.Context) error

type SecurityIntegrationsOptions

type SecurityIntegrationsOptions struct{}

type SecurityIntegrationsView

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

func NewSecurityIntegrationsView

func NewSecurityIntegrationsView(connectionManager *snowflake.ConnectionManager, opts *SecurityIntegrationsOptions) *SecurityIntegrationsView

func (*SecurityIntegrationsView) GetBindings

func (v *SecurityIntegrationsView) GetBindings(ctx context.Context, applicationState *ApplicationState) []*KeyBinding

func (*SecurityIntegrationsView) GetRender

func (v *SecurityIntegrationsView) GetRender() tview.Primitive

func (*SecurityIntegrationsView) Update

type ServiceContainersOptions

type ServiceContainersOptions struct {
	Service *sdk.SchemaObjectIdentifier
}

type ServiceContainersView

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

func NewServiceContainersView

func NewServiceContainersView(connectionManager *snowflake.ConnectionManager, opts *ServiceContainersOptions) *ServiceContainersView

func (*ServiceContainersView) GetBindings

func (v *ServiceContainersView) GetBindings(ctx context.Context, applicationState *ApplicationState) []*KeyBinding

func (*ServiceContainersView) GetRender

func (v *ServiceContainersView) GetRender() tview.Primitive

func (*ServiceContainersView) Update

func (v *ServiceContainersView) Update(ctx context.Context) error

type ServiceInstancesOptions

type ServiceInstancesOptions struct {
	Service *sdk.SchemaObjectIdentifier
}

type ServiceInstancesView

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

func NewServiceInstancesView

func NewServiceInstancesView(connectionManager *snowflake.ConnectionManager, opts *ServiceInstancesOptions) *ServiceInstancesView

func (*ServiceInstancesView) GetBindings

func (v *ServiceInstancesView) GetBindings(ctx context.Context, applicationState *ApplicationState) []*KeyBinding

func (*ServiceInstancesView) GetRender

func (v *ServiceInstancesView) GetRender() tview.Primitive

func (*ServiceInstancesView) Update

func (v *ServiceInstancesView) Update(ctx context.Context) error

type ServiceLogsOptions

type ServiceLogsOptions struct {
	Service       *sdk.SchemaObjectIdentifier
	InstanceId    int
	ContainerName string
}

type ServiceLogsView

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

func NewServiceLogsView

func NewServiceLogsView(connectionManager *snowflake.ConnectionManager, opts *ServiceLogsOptions) *ServiceLogsView

func (*ServiceLogsView) GetBindings

func (v *ServiceLogsView) GetBindings(ctx context.Context, applicationState *ApplicationState) []*KeyBinding

func (*ServiceLogsView) GetRender

func (v *ServiceLogsView) GetRender() tview.Primitive

func (*ServiceLogsView) Update

func (v *ServiceLogsView) Update(ctx context.Context) error

type ServicesOptions

type ServicesOptions struct {
	ComputePool *sdk.AccountObjectIdentifier
	Database    *sdk.AccountObjectIdentifier
	Schema      *sdk.DatabaseObjectIdentifier
}

type ServicesView

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

func NewServicesView

func NewServicesView(connectionManager *snowflake.ConnectionManager, opts *ServicesOptions) *ServicesView

func (*ServicesView) GetBindings

func (v *ServicesView) GetBindings(ctx context.Context, applicationState *ApplicationState) []*KeyBinding

func (*ServicesView) GetRender

func (v *ServicesView) GetRender() tview.Primitive

func (*ServicesView) Update

func (v *ServicesView) Update(ctx context.Context) error

type SnapshotsOptions

type SnapshotsOptions struct {
	Database *sdk.AccountObjectIdentifier
	Schema   *sdk.DatabaseObjectIdentifier
}

type SnapshotsView

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

func NewSnapshotsView

func NewSnapshotsView(connectionManager *snowflake.ConnectionManager, opts *SnapshotsOptions) *SnapshotsView

func (*SnapshotsView) GetBindings

func (t *SnapshotsView) GetBindings(ctx context.Context, applicationState *ApplicationState) []*KeyBinding

func (*SnapshotsView) GetRender

func (v *SnapshotsView) GetRender() tview.Primitive

func (*SnapshotsView) Update

func (v *SnapshotsView) Update(ctx context.Context) error

type SnowflakeContext

type SnowflakeContext struct {
	Schema    string
	Database  string
	Warehouse string
	Role      string

	// Account Locator https://docs.snowflake.com/en/user-guide/admin-account-identifier#format-2-account-locator-in-a-region
	Account string
	// Account Name within Organization https://docs.snowflake.com/en/user-guide/admin-account-identifier#format-1-preferred-account-name-in-your-organization
	AccountName      string
	OrganizationName string
	Region           string
	// contains filtered or unexported fields
}

func NewSnowflakeContext

func NewSnowflakeContext(cm *snowflake.ConnectionManager) *SnowflakeContext

func (*SnowflakeContext) GetRender

func (s *SnowflakeContext) GetRender() *tview.Table

func (*SnowflakeContext) Update

func (s *SnowflakeContext) Update(ctx context.Context) error

type StagesOptions

type StagesOptions struct {
	Database *string
	Schema   *string
}

type StagesView

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

func NewStagesView

func NewStagesView(connectionManager *snowflake.ConnectionManager, opts *StagesOptions) *StagesView

func (*StagesView) GetBindings

func (t *StagesView) GetBindings(ctx context.Context, applicationState *ApplicationState) []*KeyBinding

func (*StagesView) GetRender

func (v *StagesView) GetRender() tview.Primitive

func (*StagesView) Update

func (v *StagesView) Update(ctx context.Context) error

type Status

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

func NewStatus

func NewStatus() *Status

func (*Status) GetRender

func (s *Status) GetRender() *tview.TextView

func (*Status) SetError

func (s *Status) SetError(err error)

func (*Status) SetMessage

func (s *Status) SetMessage(message string)

type StreamlitsOptions

type StreamlitsOptions struct {
	Database *sdk.AccountObjectIdentifier
	Schema   *sdk.DatabaseObjectIdentifier
}

type StreamlitsView

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

func NewStreamlitsView

func NewStreamlitsView(connectionManager *snowflake.ConnectionManager, opts *StreamlitsOptions) *StreamlitsView

func (*StreamlitsView) GetBindings

func (v *StreamlitsView) GetBindings(ctx context.Context, applicationState *ApplicationState) []*KeyBinding

func (*StreamlitsView) GetRender

func (v *StreamlitsView) GetRender() tview.Primitive

func (*StreamlitsView) Update

func (v *StreamlitsView) Update(ctx context.Context) error

type Table

type Table struct {
	Title   string
	Columns []string
	Rows    [][]string
}

type TablesOptions

type TablesOptions struct{}

type TablesView

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

func NewTablesView

func NewTablesView(connectionManager *snowflake.ConnectionManager, opts *TablesOptions) *TablesView

func (*TablesView) GetBindings

func (v *TablesView) GetBindings(ctx context.Context, applicationState *ApplicationState) []*KeyBinding

func (*TablesView) GetRender

func (v *TablesView) GetRender() tview.Primitive

func (*TablesView) Update

func (v *TablesView) Update(ctx context.Context) error

type UsersOptions

type UsersOptions struct{}

type UsersView

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

func NewUsersView

func NewUsersView(connectionManager *snowflake.ConnectionManager, opts *UsersOptions) *UsersView

func (*UsersView) GetBindings

func (t *UsersView) GetBindings(ctx context.Context, applicationState *ApplicationState) []*KeyBinding

func (*UsersView) GetRender

func (v *UsersView) GetRender() tview.Primitive

func (*UsersView) Update

func (v *UsersView) Update(ctx context.Context) error

type VersionsOptions

type VersionsOptions struct {
	ApplicationPackage sdk.AccountObjectIdentifier
}

type VersionsView

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

func NewVersionsView

func NewVersionsView(connectionManager *snowflake.ConnectionManager, opts *VersionsOptions) *VersionsView

func (*VersionsView) GetBindings

func (v *VersionsView) GetBindings(ctx context.Context, applicationState *ApplicationState) []*KeyBinding

func (*VersionsView) GetRender

func (v *VersionsView) GetRender() tview.Primitive

func (*VersionsView) Update

func (v *VersionsView) Update(ctx context.Context) error

type ViewsOptions

type ViewsOptions struct{}

type ViewsView

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

func NewViewsView

func NewViewsView(connectionManager *snowflake.ConnectionManager, opts *ViewsOptions) *ViewsView

func (*ViewsView) GetBindings

func (v *ViewsView) GetBindings(ctx context.Context, applicationState *ApplicationState) []*KeyBinding

func (*ViewsView) GetRender

func (v *ViewsView) GetRender() tview.Primitive

func (*ViewsView) Update

func (v *ViewsView) Update(ctx context.Context) error

type WarehousesOptions

type WarehousesOptions struct{}

type WarehousesView

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

func NewWarehousesView

func NewWarehousesView(connectionManager *snowflake.ConnectionManager, opts *WarehousesOptions) *WarehousesView

func (*WarehousesView) GetBindings

func (t *WarehousesView) GetBindings(ctx context.Context, applicationState *ApplicationState) []*KeyBinding

func (*WarehousesView) GetRender

func (v *WarehousesView) GetRender() tview.Primitive

func (*WarehousesView) Update

func (v *WarehousesView) Update(ctx context.Context) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳