source

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

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