Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
Addr string
// contains filtered or unexported fields
}
App provides high level interface to app functions for server
func (*App) StartServer ¶
StartServer listen incoming requests. Blocking function
type Config ¶
type Config struct {
Debug bool
TemplatePath string
AssetsPrefix string
StorageSpec string
StatusText string
AdminPassword string
UIDSecret string // secret key to generate user ids
}
Config contains application configuration
type CreatePasteRequest ¶
type CreatePasteRequest struct {
Text string `json:"text"`
Syntax string `json:"syntax"`
UserToken string `json:"token,omitempty"`
Ttl time.Duration
}
func ParseCreatePasteRequest ¶
func ParseCreatePasteRequest(r *http.Request) (*CreatePasteRequest, error)
type UserError ¶
UserError error caused by wrong user input. Contains causer error and message intended to show to user
func WrapfUserError ¶
WrapfUserError return UserError with formatted user message
Click to show internal directories.
Click to hide internal directories.