object

package
v1.23.1 Latest Latest
Warning

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

Go to latest
Published: May 2, 2023 License: Apache-2.0 Imports: 4 Imported by: 16

Documentation

Overview

Package object provide storage object/link implementation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(URL string, info os.FileInfo, source interface{}) storage.Object

New creates a new storage object

Types

type Link struct {
	Source   interface{}
	Linkname string
	LinkURL  string
}

Link represents a link source wrapper

func NewLink(linkname, linkURL string, source interface{}) *Link

NewLink create a link

type Object

type Object struct {
	Source interface{}

	os.FileInfo
	// contains filtered or unexported fields
}

Object represents abstract storage object

func (*Object) LinkURL

func (o *Object) LinkURL() string

LinkURL returns link URL (absolute path)

func (*Object) Linkname

func (o *Object) Linkname() string

Linkname returns a link name

func (*Object) URL

func (o *Object) URL() string

URL return storage url

func (*Object) Unwrap

func (o *Object) Unwrap(target interface{}) error

Unwrap unwrap source storage to target pointer

func (*Object) Wrap

func (o *Object) Wrap(source interface{})

Wrap wraps Source storage object

Jump to

Keyboard shortcuts

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