entity

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const APP_VERSION = "0.0.5 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"),
			ButtonColor:      tcell.GetColor("#5500FF"),
			FieldColor:       tcell.GetColor("#111111"),
			PlaceholderColor: tcell.GetColor("#666666"),
			CommandBarColor:  tcell.GetColor("#333333"),
		},
	}
)

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 ColorValue

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

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
	ShowTimeHeader bool
	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"`
}

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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL