Documentation
¶
Index ¶
- func New(cfg *config.Config) *http.Server
- type AuthManager
- type BlockUserDTO
- type BlockUserParams
- type CreateShortUrlDTO
- type DeleteShortUrlParams
- type DeleteURLParams
- type DeleteUserURLsParams
- type DeleteUserURLsResponse
- type GetLongUrlParams
- type GetLongUrlResponse
- type HTTPError
- type HTTPValidationError
- type HealthResponse
- type PaginatedURLs
- type PaginatedUserBlocks
- type PaginatedUserURLs
- type Pagination
- type PaginationFilters
- type Server
- type URLResponse
- type URLsFilters
- type UserBlocksFilters
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthManager ¶
type AuthManager interface {
BlockUser(ctx context.Context, userID string) (*management.UpdateUserResponseContent, error)
UnblockUser(ctx context.Context, userID string) error
}
AuthManager defines the interface for user management operations with Auth0
type BlockUserDTO ¶
type BlockUserDTO struct {
Reason *string `json:"reason" validate:"omitzero,min=1,max=255"`
}
type BlockUserParams ¶
type BlockUserParams struct {
DeleteUserURLsParams
BlockUserDTO
}
type CreateShortUrlDTO ¶
type DeleteShortUrlParams ¶
type DeleteShortUrlParams struct {
GetLongUrlParams
}
type DeleteURLParams ¶
type DeleteURLParams struct {
GetLongUrlParams
}
type DeleteUserURLsParams ¶
type DeleteUserURLsParams struct {
UserID string `param:"userId" validate:"required,min=1,max=50"`
}
type DeleteUserURLsResponse ¶
type DeleteUserURLsResponse struct {
Deleted int `json:"deleted"`
}
type GetLongUrlParams ¶
type GetLongUrlParams struct {
Code string `param:"code" validate:"required,max=16"`
}
type GetLongUrlResponse ¶
type GetLongUrlResponse struct {
LongUrl string `json:"longUrl"`
}
type HTTPError ¶
type HTTPError struct {
Message string `json:"message" example:"error message"`
}
HTTPError represents an HTTP error response for swagger documentation
type HTTPValidationError ¶
type HTTPValidationError struct {
HTTPError
Errors appvalidator.ValidationError `json:"errors" example:"{\"field\":\"field error message\"}"`
}
HTTPValidationError represents an HTTP error (400) response for swagger documentation
type HealthResponse ¶
type PaginatedURLs ¶
type PaginatedURLs struct {
Items []repository.Url `json:"items"`
Pagination Pagination `json:"pagination"`
}
type PaginatedUserBlocks ¶
type PaginatedUserBlocks struct {
Items []repository.UserBlock `json:"items"`
Pagination Pagination `json:"pagination"`
}
type PaginatedUserURLs ¶
type PaginatedUserURLs struct {
Items []URLResponse `json:"items"`
Pagination Pagination `json:"pagination"`
}
type Pagination ¶
type PaginationFilters ¶
type URLResponse ¶
type URLsFilters ¶
type URLsFilters struct {
PaginationFilters
IsCustom *bool `query:"isCustom" validate:"omitzero,boolean"`
UserID *string `query:"userId" validate:"omitzero,min=1,max=50"`
}
type UserBlocksFilters ¶
type UserBlocksFilters struct {
PaginationFilters
}
Click to show internal directories.
Click to hide internal directories.