Documentation ¶
Index ¶
- type Option
- type Resource
- func (r *Resource) Clone() *Resource
- func (r *Resource) CredentialURL(username, password string) string
- func (r *Resource) Decode(request interface{}) error
- func (r *Resource) DecodeWith(ctx context.Context, fs afs.Service, target interface{}, ...) error
- func (r *Resource) DecoderFactory() toolbox.DecoderFactory
- func (r *Resource) DownloadBase64(ctx context.Context, fs afs.Service) (string, error)
- func (r *Resource) DownloadText() (string, error)
- func (r *Resource) Host() string
- func (r *Resource) Hostname() string
- func (r *Resource) JSONDecode(ctx context.Context, fs afs.Service, target interface{}) error
- func (r *Resource) Join(uri string) *Resource
- func (r *Resource) Path() string
- func (r *Resource) Port() string
- func (r *Resource) Rename(name string)
- func (r *Resource) Scheme() string
- func (r *Resource) YAMLDecode(ctx context.Context, fs afs.Service, target interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Resource ¶
type Resource struct { URL string `description:"resource URL or relative or absolute path" required:"true" yaml:",omitempty"` //URL of resource Credentials string `description:"credentials file" yaml:",omitempty"` //name of credential file or credential key depending on implementation CustomKey *option.AES256Key `description:" content encryption key" yaml:",omitempty"` Key string `description:" secret key" yaml:",omitempty"` }
Resource represents
func NewResource ¶
func (*Resource) CredentialURL ¶
CredentialURL returns url's with provided credential
func (*Resource) DecodeWith ¶
func (*Resource) DecoderFactory ¶
func (r *Resource) DecoderFactory() toolbox.DecoderFactory
Resource
func (*Resource) DownloadBase64 ¶
DownloadBase64 loads base64 resource content
func (*Resource) DownloadText ¶
func (*Resource) JSONDecode ¶
JSONDecode decodes json resource into target
Click to show internal directories.
Click to hide internal directories.