jx/internal/source/docsource.go
Matthew Rich 0888ae2045
Some checks failed
Lint / golangci-lint (push) Failing after 9m55s
Declarative Tests / test (push) Failing after 5s
add container-image resource
2024-05-23 22:11:51 -07:00

38 lines
620 B
Go

// Copyright 2024 Matthew Rich <matthewrich.conf@gmail.com>. All rights reserved.
package source
import (
_ "context"
_ "encoding/json"
_ "fmt"
_ "gopkg.in/yaml.v3"
_ "net/url"
_ "regexp"
_ "strings"
_ "os"
_ "io"
_ "compress/gzip"
_ "archive/tar"
_ "errors"
_ "path/filepath"
"decl/internal/resource"
_ "decl/internal/codec"
)
type ResourceSelector func(r resource.Resource) bool
type DocSource interface {
Type() string
ExtractResources(filter ResourceSelector) ([]*resource.Document, error)
}
func NewDocSource(uri string) DocSource {
s, e := SourceTypes.New(uri)
if e == nil {
return s
}
return nil
}