artifactcache

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	ID        int64  `xorm:"id pk autoincr" json:"-"`
	Key       string `xorm:"TEXT index unique(key_version)" json:"key"`
	Version   string `xorm:"TEXT unique(key_version)" json:"version"`
	Size      int64  `json:"cacheSize"`
	Complete  bool   `xorm:"index(complete_used_at)" json:"-"`
	UsedAt    int64  `xorm:"index(complete_used_at) updated" json:"-"`
	CreatedAt int64  `xorm:"index created" json:"-"`
}

func (*Cache) Bind

func (c *Cache) Bind(_ *http.Request) error

Bind implements render.Binder

type Handler

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

func NewHandler

func NewHandler(dir, outboundIP string, port uint16) (*Handler, error)

func (*Handler) ExternalURL

func (h *Handler) ExternalURL() string

type Storage

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

func NewStorage

func NewStorage(rootDir string) (*Storage, error)

func (*Storage) Commit

func (s *Storage) Commit(id int64, size int64) error

func (*Storage) Exist

func (s *Storage) Exist(id int64) (bool, error)

func (*Storage) Remove

func (s *Storage) Remove(id int64)

func (*Storage) Serve

func (s *Storage) Serve(w http.ResponseWriter, r *http.Request, id int64)

func (*Storage) Write

func (s *Storage) Write(id int64, offset int64, reader io.Reader) error

Jump to

Keyboard shortcuts

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