jx/internal/target/doctarget.go
Matthew Rich 43a2274b7e
Some checks failed
Lint / golangci-lint (push) Failing after 9m50s
Declarative Tests / test (push) Failing after 10s
update container/iptables resources
2024-05-05 17:48:54 -07:00

36 lines
637 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
}
func NewDocTarget(uri string) DocTarget {
s, e := TargetTypes.New(uri)
if e == nil {
return s
}
return nil
}