handler

package
v0.0.0-...-81baa11 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Duration

type Duration string
const (
	FiveMinutes Duration = "5m"
	OneHour     Duration = "1h"
	ThreeHours  Duration = "3h"
	SevenHours  Duration = "7h"
	OneDay      Duration = "24h"
)

type ShareHandler

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

func NewShareHandler

func NewShareHandler(db *redis.Client) *ShareHandler

func (*ShareHandler) Share

func (s *ShareHandler) Share(w http.ResponseWriter, r *http.Request)

type ShareInput

type ShareInput struct {
	Text           string   `json:"text"`
	Duration       Duration `json:"duration"`
	ExpireOnOpened string   `json:"expire_on_opened"`
}

type SharedDocument

type SharedDocument struct {
	Id             uuid.UUID `json:"id"`
	Hash           []byte    `json:"-"`
	Token          string    `json:"token"`
	ExpireOnOpened bool      `json:"-"`
	Host           string    `json:"host"`
}

type SharedHandler

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

func NewSharedHandler

func NewSharedHandler(db *redis.Client) *SharedHandler

func (*SharedHandler) Shared

func (s *SharedHandler) Shared(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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