upload

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UploadApplication

type UploadApplication struct {
	application.Application
}

UploadApplication implements the application.Application interface as a commandline application for uploading photos using the Flickr API

func (*UploadApplication) DefaultFlagSet

func (app *UploadApplication) DefaultFlagSet() *flag.FlagSet

Return the default FlagSet necessary for the UploadApplication to run.

func (*UploadApplication) Run

func (app *UploadApplication) Run(ctx context.Context) (interface{}, error)

Invoke the UploadApplication with its default FlagSet.

func (*UploadApplication) RunWithFlagSet

func (app *UploadApplication) RunWithFlagSet(ctx context.Context, fs *flag.FlagSet) (interface{}, error)

Invoke the UploadApplication with a custom FlagSet.

type UploadError

type UploadError struct {
	// contains filtered or unexported fields
}

UploadError is a custom error type that can be JSON-serialized.

func (*UploadError) Error

func (e *UploadError) Error() string

The error message associated with this instance.

func (*UploadError) MarshalJSON

func (e *UploadError) MarshalJSON() ([]byte, error)

This error instance serialized as a string for JSON-marshaling.

func (*UploadError) String

func (e *UploadError) String() string

The error message associated with this instance.

type UploadResult

type UploadResult struct {
	// The URI of file that was uploaded.
	Path string `json:"path,omitempty"`
	// The Photo ID of a successfully uploaded file.
	PhotoId int64 `json:"photoid,omitempty"`
	// An UploadError instance if the file was not able to be uploaded.
	Error *UploadError `json:"error,omitempty"`
}

UploadResult is struct containing information about an atomic upload.

Jump to

Keyboard shortcuts

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