Documentation ¶
Index ¶
- type Qrcode
- type QrcodeHandler
- func (h *QrcodeHandler) Create(w http.ResponseWriter, r *http.Request)
- func (h *QrcodeHandler) Manage(w http.ResponseWriter, r *http.Request)
- func (h *QrcodeHandler) Redirect(w http.ResponseWriter, r *http.Request)
- func (h *QrcodeHandler) Store(w http.ResponseWriter, r *http.Request)
- func (h *QrcodeHandler) Update(w http.ResponseWriter, r *http.Request)
- type QrcodeStore
- type SqliteQrcodeStore
- func (s *SqliteQrcodeStore) Close() error
- func (s *SqliteQrcodeStore) GetQrcode(ctx context.Context, id int) (Qrcode, error)
- func (s *SqliteQrcodeStore) GetQrcodeByPassword(ctx context.Context, password string) (Qrcode, error)
- func (s *SqliteQrcodeStore) NewQrcode(ctx context.Context, password string, target string) (err error)
- func (s *SqliteQrcodeStore) UpdateTargetUrl(ctx context.Context, id int, newTargetUrl string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type QrcodeHandler ¶
type QrcodeHandler struct {
// contains filtered or unexported fields
}
func NewQrcodeHandler ¶
func NewQrcodeHandler(store QrcodeStore, tmpl *template.Template) *QrcodeHandler
func (*QrcodeHandler) Create ¶
func (h *QrcodeHandler) Create(w http.ResponseWriter, r *http.Request)
func (*QrcodeHandler) Manage ¶
func (h *QrcodeHandler) Manage(w http.ResponseWriter, r *http.Request)
func (*QrcodeHandler) Redirect ¶
func (h *QrcodeHandler) Redirect(w http.ResponseWriter, r *http.Request)
func (*QrcodeHandler) Store ¶
func (h *QrcodeHandler) Store(w http.ResponseWriter, r *http.Request)
func (*QrcodeHandler) Update ¶
func (h *QrcodeHandler) Update(w http.ResponseWriter, r *http.Request)
type QrcodeStore ¶
type QrcodeStore interface { NewQrcode(ctx context.Context, password string, target string) error GetQrcode(ctx context.Context, id int) (Qrcode, error) GetQrcodeByPassword(ctx context.Context, password string) (Qrcode, error) UpdateTargetUrl(ctx context.Context, id int, newTargetUrl string) error Close() error }
type SqliteQrcodeStore ¶
type SqliteQrcodeStore struct {
// contains filtered or unexported fields
}
func NewSqliteQrcodeStore ¶
func NewSqliteQrcodeStore(path string) (*SqliteQrcodeStore, error)
func (*SqliteQrcodeStore) Close ¶
func (s *SqliteQrcodeStore) Close() error
func (*SqliteQrcodeStore) GetQrcodeByPassword ¶
func (*SqliteQrcodeStore) UpdateTargetUrl ¶
Click to show internal directories.
Click to hide internal directories.