Documentation
¶
Index ¶
- func ClientError(status int, message string) (events.APIGatewayProxyResponse, error)
- func GenerateShortURLID(length int) string
- func IsValidLink(u string) bool
- func ServerError(err error) (events.APIGatewayProxyResponse, error)
- type DeleteFunctionHandler
- type GenerateLinkFunctionHandler
- type RedirectFunctionHandler
- type RequestBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientError ¶
func ClientError(status int, message string) (events.APIGatewayProxyResponse, error)
func GenerateShortURLID ¶
func IsValidLink ¶
func ServerError ¶
func ServerError(err error) (events.APIGatewayProxyResponse, error)
Types ¶
type DeleteFunctionHandler ¶
type DeleteFunctionHandler struct {
// contains filtered or unexported fields
}
func NewDeleteFunctionHandler ¶
func NewDeleteFunctionHandler(l *services.LinkService) *DeleteFunctionHandler
func (*DeleteFunctionHandler) Delete ¶
func (s *DeleteFunctionHandler) Delete(ctx context.Context, req events.APIGatewayV2HTTPRequest) (events.APIGatewayProxyResponse, error)
type GenerateLinkFunctionHandler ¶
type GenerateLinkFunctionHandler struct {
// contains filtered or unexported fields
}
func NewGenerateLinkFunctionHandler ¶
func NewGenerateLinkFunctionHandler(l *services.LinkService) *GenerateLinkFunctionHandler
func (*GenerateLinkFunctionHandler) CreateShortLink ¶
func (h *GenerateLinkFunctionHandler) CreateShortLink(ctx context.Context, req events.APIGatewayV2HTTPRequest) (events.APIGatewayProxyResponse, error)
type RedirectFunctionHandler ¶
type RedirectFunctionHandler struct {
// contains filtered or unexported fields
}
func NewRedirectFunctionHandler ¶
func NewRedirectFunctionHandler(l *services.LinkService) *RedirectFunctionHandler
func (*RedirectFunctionHandler) Redirect ¶
func (h *RedirectFunctionHandler) Redirect(ctx context.Context, req events.APIGatewayV2HTTPRequest) (events.APIGatewayProxyResponse, error)
type RequestBody ¶
type RequestBody struct {
Long string `json:"long"`
}
Click to show internal directories.
Click to hide internal directories.