url

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(URL string, target interface{}) (err error)

Decode decodes url's data into target, it support JSON and YAML exp.

Types

type AES256Key

type AES256Key struct {
	Key                 []byte
	Base64Key           string
	Base64KeyMd5Hash    string
	Base64KeySha256Hash string
}

AES256Key represents custom key

type Resource

type Resource struct {
	URL         string     `description:"resource URL or relative or absolute path" required:"true"` //URL of resource
	Credentials string     `description:"credentials file"`                                          //name of credential file or credential key depending on implementation
	CustomKey   *AES256Key `description:" content encryption key"`
}

Resource represents a URL based resource, with enriched meta info

func NewResource

func NewResource(Params ...interface{}) *Resource

NewResource returns a new resource for provided URL, followed by optional credential, cache and cache expiryMs.

func (*Resource) Init

func (r *Resource) Init() (err error)

Source Files

  • key.go
  • resource.go

Jump to

Keyboard shortcuts

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