upload

package
v1.0.4-gitspaces-beta Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxFileSize = 10 << 20 // 10 MB file limit set in Handler

)

Variables

WireSet provides a wire set for this package.

Functions

This section is empty.

Types

type Controller

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

func NewController

func NewController(authorizer authz.Authorizer,
	repoStore store.RepoStore,
	blobStore blob.Store,
) *Controller

func ProvideController

func ProvideController(
	authorizer authz.Authorizer,
	repoStore store.RepoStore,
	blobStore blob.Store,
) *Controller

func (*Controller) Download

func (c *Controller) Download(
	ctx context.Context,
	session *auth.Session,
	repoRef string,
	filePath string,
) (string, io.ReadCloser, error)

func (*Controller) Upload

func (c *Controller) Upload(ctx context.Context,
	session *auth.Session,
	repoRef string,
	file io.Reader,
) (*Result, error)

type Result

type Result struct {
	FilePath string `json:"file_path"`
}

Result contains the information about the upload.

Jump to

Keyboard shortcuts

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