Documentation
¶
Index ¶
- func AllTypeNames() []string
- func AllTypes() []any
- func DiscoverTypeNames() ([]string, error)
- func JSONLegacyName(metadata any) string
- func JSONName(metadata any) string
- func JSONNameFromString(typeName string) string
- func ReflectTypeFromJSONName(name string) reflect.Type
- func RepoRoot() (string, error)
- func ToUpperCamelCase(kebab string) string
- type CompletionTester
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllTypeNames ¶
func AllTypeNames() []string
func AllTypes ¶
func AllTypes() []any
AllTypes returns a list of all pkg metadata types that syft supports (that are represented in the pkg.Package.Metadata field).
func DiscoverTypeNames ¶
func JSONLegacyName ¶
func JSONNameFromString ¶ added in v1.39.0
JSONNameFromString converts a Go struct name string (e.g., "pkg.AlpmDBEntry" or "AlpmDBEntry") to its JSON schema name (e.g., "alpm-db-entry"). Returns empty string if not found.
func ReflectTypeFromJSONName ¶
func ToUpperCamelCase ¶ added in v1.39.0
ToUpperCamelCase converts kebab-case to UpperCamelCase e.g., "alpm-db-entry" -> "AlpmDbEntry"
Types ¶
type CompletionTester ¶
type CompletionTester struct {
// contains filtered or unexported fields
}
func NewCompletionTester ¶
func NewCompletionTester(t testing.TB, ignore ...any) *CompletionTester
func (*CompletionTester) Expect ¶
func (tr *CompletionTester) Expect(is ...any)
func (*CompletionTester) Ignore ¶
func (tr *CompletionTester) Ignore(is ...any)
Click to show internal directories.
Click to hide internal directories.