source

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: Apache-2.0 Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// Megabyte represent the related unit.
	Megabyte = 1 << 20
	// Kilobyte represent the related unit.
	Kilobyte = 1 << 10
)

Variables

This section is empty.

Functions

func CompressToString

func CompressToString(content []byte) (string, error)

func IsBinary

func IsBinary(contentType string) bool

func IsLocalAndFileExists

func IsLocalAndFileExists(uri string) (bool, error)

func LoadRawContent

func LoadRawContent(ctx context.Context, source string) ([]byte, string, error)

func LoadTextContent

func LoadTextContent(ctx context.Context, source string, base64Compression bool) (string, string, bool, error)

Types

type Source

type Source struct {
	Origin   string
	Location string
	Name     string
	Content  string
	Compress bool
	Local    bool
}

Source represents the source file of an Integration.

func Resolve

func Resolve(ctx context.Context, locations []string, compress bool, cmd *cobra.Command) ([]Source, error)

Resolve resolves sources from a variety of locations including local and remote.

func (Source) IsYaml

func (s Source) IsYaml() bool

Jump to

Keyboard shortcuts

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