Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Authenticator ¶
Authenticator returns new share authentication middleware.
func BlockHandler ¶
func BlockHandler(next http.HandlerFunc) http.HandlerFunc
BlockHandler responds with NotFound for all requests that have share in context
func VerifyHandler ¶
func VerifyHandler(shareType module.Type, nameParam, itemParam string, next http.HandlerFunc) http.HandlerFunc
VerifyHandler verifies share from the context against name and option item parameter.
Types ¶
type Share ¶
type Share struct {
}
Share stores share data.
type Store ¶
type Store interface {
// All returns all stores shares.
All() ([]Share, error)
// Save persists share metadata.
Save(share *Share) error
// Get return share metadata.
Get(slug string) (*Share, error)
// Remove removes share metadata.
Remove(slug string) error
// Expire removes all expired shares.
Expire() error
}
Store manages share metadata.
func NewDiskStore ¶
NewDiskStore returns a new on-disk implementation of the ShareStore.
Click to show internal directories.
Click to hide internal directories.