xport

package
v0.0.0-...-1a3a2fa Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBadType = errors.New("unknown format type")
)

Functions

This section is empty.

Types

type ExportJob

type ExportJob struct {
	Type             Format `json:"type" form:"type"`
	SystemID         int    `json:"systemID" form:"systemID"`
	Template         []byte `json:"template" form:"template" filenameField:"TemplateFileName"`
	TemplateFileName string

	filter.Filter
	Exporter
}

func (*ExportJob) Export

func (ej *ExportJob) Export(ctx context.Context, w io.Writer) error

type Exporter

type Exporter interface {
	ExportTalkgroups(ctx context.Context, w io.Writer, tgs []*talkgroups.Talkgroup, tmpl []byte) error
}

type Format

type Format string
const (
	FormatRadioReference Format = "radioreference"
	FormatSDRTrunk       Format = "sdrtrunk"
)

type ImportJob

type ImportJob struct {
	Type     Format `json:"type"`
	SystemID int    `json:"systemID"`
	Body     string `json:"body"`

	Importer `json:"-"`
}

func (*ImportJob) Import

func (ij *ImportJob) Import(ctx context.Context) ([]talkgroups.Talkgroup, error)

type Importer

type Importer interface {
	ImportTalkgroups(ctx context.Context, sys int, r io.Reader) ([]talkgroups.Talkgroup, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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