model

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LanguageUnknown  = Language(0)
	LanguageBash     = Language(1)
	LanguageYAML     = Language(2)
	LanguageMarkdown = Language(3)
	LanguageText     = Language(4)
	LanguageTOML     = Language(5)
)
View Source
const (
	ParameterTypeValue    = ParameterType(0)
	ParameterTypePath     = ParameterType(1)
	ParameterTypePassword = ParameterType(2)
)
View Source
const (
	SnippetParamModeSet     = 0
	SnippetParamModeReplace = 1
)
View Source
const (
	SyncStatusStarted  = SyncStatus(1)
	SyncStatusFinished = SyncStatus(2)
	SyncStatusAborted  = SyncStatus(3)

	SyncLineTypeInfo    = SyncLineType(0)
	SyncLineTypeSuccess = SyncLineType(1)
	SyncLineTypeError   = SyncLineType(2)

	SyncLoginTypeContinue = SyncLoginType(1)
	SyncLoginTypeText     = SyncLoginType(2)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type InfoLine added in v1.0.0

type InfoLine struct {
	Key     string
	Value   string
	IsError bool
}

type Language

type Language int

type ManagerDescription added in v1.0.0

type ManagerDescription struct {
	Key         ManagerKey
	Name        string
	Description string
	Enabled     bool
}

type ManagerKey added in v1.0.0

type ManagerKey string

type Parameter

type Parameter struct {
	Key          string
	Name         string
	Type         ParameterType
	Description  string
	DefaultValue string
	Values       []string
}

type ParameterType added in v1.3.0

type ParameterType int

type Snippet

type Snippet interface {
	GetID() string
	GetTitle() string
	GetContent() string
	GetTags() []string
	GetLanguage() Language
	GetParameters() []Parameter
	Format([]string, SnippetFormatOptions) string
}

type SnippetFormatOptions added in v1.2.0

type SnippetFormatOptions struct {
	RemoveComments bool
	ParamMode      SnippetParamMode
}

type SnippetParamMode added in v1.2.0

type SnippetParamMode int

type SyncEvent added in v1.1.0

type SyncEvent struct {
	Status SyncStatus
	Lines  []SyncLine
	Login  *SyncInput
	Error  error
}

type SyncEventChannel added in v1.1.0

type SyncEventChannel chan SyncEvent

type SyncInput added in v1.1.0

type SyncInput struct {
	Content     interface{}
	Placeholder string
	Type        SyncLoginType
	Input       chan SyncInputResult
}

type SyncInputResult added in v1.1.0

type SyncInputResult struct {
	Continue bool
	Abort    bool
	Text     string
}

type SyncLine added in v1.1.0

type SyncLine struct {
	Type  SyncLineType
	Value string
}

type SyncLineType added in v1.1.0

type SyncLineType int

type SyncLoginType added in v1.1.0

type SyncLoginType int

type SyncStatus added in v1.1.0

type SyncStatus int

Jump to

Keyboard shortcuts

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