entity

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const APP_VERSION = "0.0.6 ALPHA"
View Source
View Source
const BOOKMARKS_FILE_NAME = ".bookmarks"

Bookmarks configuration file

Variables

View Source
var (
	TerminalTheme = Theme{
		Name: "Terminal",
		Colors: ColorValue{
			Error:           tcell.GetColor("red"),
			Warning:         tcell.GetColor("darkred"),
			Notice:          tcell.GetColor("silver"),
			WindowColor:     tcell.GetColor("#444444"),
			ModalColor:      tcell.GetColor("#111111"),
			CommandBarColor: tcell.GetColor("#333333"),
		},
		Style: ComponentStyle{
			ButtonStyle: tcell.StyleDefault.
				Background(tcell.GetColor("#5500FF")),
			PlaceholderStyle: tcell.StyleDefault.
				Background(tcell.GetColor("#666666")).Italic(true),
			FieldStyle: tcell.StyleDefault.
				Background(tcell.GetColor("#666666")),
			ListMainTextStyle: tcell.StyleDefault.
				Background(tcell.GetColor("#444444")),
		},
	}
)

Functions

This section is empty.

Types

type Auth

type Auth struct {
	AuthType       AuthType              `json:"auth_type"`
	BearerToken    *AuthValueBearerToken `json:"bearer_token"`
	AuthTypeAPIKey *AuthValueTypeAPIKey  `json:"api_key"`
}

type AuthType

type AuthType string
const (
	AuthTypeBearer AuthType = "bearer"
	AuthTypeAPIKey AuthType = "api"
)

type AuthValueBearerToken

type AuthValueBearerToken struct {
	Token string `json:"token"`
}

type AuthValueTypeAPIKey

type AuthValueTypeAPIKey struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type Category

type Category struct {
	Name     string    `json:"category_name"`
	Sessions []Session `json:"sessions"`
}

type Cert added in v0.0.6

type Cert struct {
	CA_Path         *string
	ClientCert_Path *string
	ClientKey_Path  *string
}

type ColorValue

type ColorValue struct {
	Error           tcell.Color
	Warning         tcell.Color
	Notice          tcell.Color
	WindowColor     tcell.Color
	ModalColor      tcell.Color
	CommandBarColor tcell.Color
}

type ComponentStyle added in v0.0.6

type ComponentStyle struct {
	ButtonStyle       tcell.Style
	PlaceholderStyle  tcell.Style
	FieldStyle        tcell.Style
	ListMainTextStyle tcell.Style
	ListBorderStyle   tcell.Style
}

type Log

type Log struct {
	Content string
	Type    LogType
}

func (*Log) DumpLogToChannel

func (l *Log) DumpLogToChannel(logChannel chan Log)

type LogType

type LogType int8
const (
	LOG_INFO    LogType = 0
	LOG_ERROR   LogType = 1
	LOG_WARNING LogType = 2
)

type Metadata

type Metadata struct {
	Active bool
	Key    string
	Value  string
}

type Output added in v0.0.5

type Output struct {
	Content     string
	WithHeader  bool
	CursorAtEnd bool
}

func (*Output) DumpLogToChannel added in v0.0.5

func (l *Output) DumpLogToChannel(outputChannel chan Output)

type Session

type Session struct {
	ID                uuid.UUID                `json:"id"`
	Name              string                   `json:"name"`
	ServerURL         string                   `json:"server_url"`
	Authorization     *Auth                    `json:"authorization"`
	ActiveConnection  *grpc.ClientConn         `json:"-"`
	AvailableServices []string                 `json:"-"`
	SelectedMethod    *string                  `json:"selected_method"`
	AvailableMethods  []string                 `json:"-"`
	RequestPayload    string                   `json:"request_payload"`
	DescriptorSource  grpcurl.DescriptorSource `json:"-"`
	Metadata          []*Metadata              `json:"metadata"`

	// SSL Certificates
	EnableTLS          bool  `json:"enable_tls"`
	SSLCert            *Cert `json:"ssl_cert"`
	InsecureSkipVerify bool  `json:"insecure_skip_verify"`
}

func (*Session) ParseMetadata

func (s *Session) ParseMetadata() []string

ParseMetadata used to convert the metadata and authorization parameters to array of strings

type Theme

type Theme struct {
	Name   string
	Colors ColorValue
	Style  ComponentStyle
}

Jump to

Keyboard shortcuts

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