sharer

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handle

func Handle(logger log.Logger, s Sharer) http.HandlerFunc

Types

type GCSSharer

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

func NewGCSSharer

func NewGCSSharer(bucket string) (*GCSSharer, error)

func (GCSSharer) Close

func (s GCSSharer) Close()
func (s GCSSharer) CreateLink(name string, pageState string) error
func (s GCSSharer) GetLink(name string) (pageState string, err error)

type SQLSharer

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

func NewSQLSharer

func NewSQLSharer(logger log.Logger, driver string, dsn string, createTables bool, retention time.Duration) (*SQLSharer, error)

func (SQLSharer) Close

func (s SQLSharer) Close()
func (s SQLSharer) CreateLink(name string, pageState string) error
func (s SQLSharer) GetLink(name string) (pageState string, err error)

type Sharer

type Sharer interface {
	CreateLink(name string, pageState string) error
	GetLink(name string) (string, error)
	Close()
}

Jump to

Keyboard shortcuts

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