ibmcloud

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Read

func Read(ctx context.Context, url string) ([]byte, error)

Read reads content from a http URL or a local file

Types

type ContentReader

type ContentReader struct {
	URLReader
	LocalReader
}

ContentReader is an agnostic util reader to fetch content from web or local path or potentially other places.

type LocalReader

type LocalReader struct {
}

LocalReader struct is used to read content from a local file

func (*LocalReader) ReadLocal

func (localReader *LocalReader) ReadLocal(path string) ([]byte, error)

ReadLocal reads content from a local file

type URLReader

type URLReader struct {
}

URLReader is used by ContentReader

func (*URLReader) ReadURL

func (urlReader *URLReader) ReadURL(url string, token string) (content []byte, retCode int, err error)

ReadURL reads content from an URL

Directories

Path Synopsis
Package v1 is the package for the types used in Seed resources +k8s:deepcopy-gen=package +k8s:openapi-gen=true
Package v1 is the package for the types used in Seed resources +k8s:deepcopy-gen=package +k8s:openapi-gen=true

Jump to

Keyboard shortcuts

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