jx/internal/target/doctarget.go
Matthew Rich 369cb7fde5
Some checks failed
Declarative Tests / test (push) Waiting to run
Lint / golangci-lint (push) Has been cancelled
add jx-import doc
2024-05-09 01:50:56 -07:00

37 lines
652 B
Go

// Copyright 2024 Matthew Rich <matthewrich.conf@gmail.com>. All rights reserved.
package target
import (
_ "context"
_ "encoding/json"
_ "fmt"
_ "gopkg.in/yaml.v3"
_ "net/url"
_ "regexp"
_ "strings"
_ "os"
_ "io"
"decl/internal/resource"
)
// convert a document into some other container type
// move selector to resource pkg
// type ResourceSelector func(r resource.Resource) bool
type DocTarget interface {
Type() string
EmitResources(documents []*resource.Document, filter resource.ResourceSelector) error
Close() error
}
func NewDocTarget(uri string) DocTarget {
s, e := TargetTypes.New(uri)
if e == nil {
return s
}
return nil
}