destination

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

File: internal/destination/prompt.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Destination

type Destination struct {
	Type    string      `yaml:"type"` // slack, lineworks, custom
	Token   TokenConfig `yaml:"token,omitempty"`
	Channel string      `yaml:"channel,omitempty"`
	URL     string      `yaml:"url,omitempty"`
}

type Manager

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

func NewManager

func NewManager(configPath string) *Manager

func (*Manager) Add

func (m *Manager) Add(name string, dest Destination) error

func (*Manager) Get

func (m *Manager) Get(name string) (Destination, bool)

func (*Manager) List

func (m *Manager) List() []string

func (*Manager) Load

func (m *Manager) Load() error

func (*Manager) Remove

func (m *Manager) Remove(name string) error

func (*Manager) Save

func (m *Manager) Save() error

func (*Manager) Update

func (m *Manager) Update(name string, dest Destination) error

type Prompt

type Prompt struct{}

func NewPrompt

func NewPrompt() *Prompt

func (*Prompt) PromptDestination

func (p *Prompt) PromptDestination(defaultDest *Destination) (string, Destination, error)

type TokenConfig

type TokenConfig struct {
	Type  string `yaml:"type,omitempty"` // bearer, basic, api_key
	Value string `yaml:"value,omitempty"`
}

Jump to

Keyboard shortcuts

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