Documentation ¶
Index ¶
- func AuthMiddleware(next http.Handler) http.Handler
- func GeneralHeadersMiddleware(next http.Handler) http.Handler
- func GenerateImage(img image.Image, width int, height int, stroke bool, StrokeThickness int, ...) image.Image
- func RandStringRunes(n int) string
- func Run()
- func SensitiveHeadersMiddleware(next http.Handler) http.Handler
- func StripeSessionMiddleware(next http.Handler) http.Handler
- type AuthSession
- type ContextKey
- type GeneratePollResponse
- type Image
- type PasswordReset
- type Session
- type Settings
- type Stat
- type TempSession
- type UnsplashRandomImageResponse
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateImage ¶
func RandStringRunes ¶
Types ¶
type AuthSession ¶
TODO implement purging of sessions after x time
type GeneratePollResponse ¶
type GeneratePollResponse struct { Queue int `json:"queue"` Link string `json:"link"` Identifier string `json:"identifier"` RandomImage bool `json:"randomImage"` Thumbnail string `json:"thumbnail"` Description string `json:"description"` UserName string `json:"user_name"` UserLocation string `json:"user_location"` UserLink string `json:"user_link"` ThumbnailLink string `json:"image_link"` }
type Image ¶
type Image struct { FileName string `json:"file_name"` Identifier string `json:"identifier"` Timestamp time.Time `json:"timestamp"` RequestIP string `json:"request_ip"` Width int Height int ImageType string Shapes bool Max int Min int ComplexityAmount int ShapesStroke bool StrokeThickness int Triangulate bool TriangulateBefore bool MaxPoints int PointsThreshold int SobelThreshold int TriangulateWireframe bool TriangulateNoise bool TriangulateGrayscale bool `json:"triangulate_grayscale"` Image image.Image `gorm:"-"` RandomImage bool `json:"randomImage"` Thumbnail string `json:"thumbnail"` Description string `json:"description"` UserName string `json:"user_name"` UserLocation string `json:"user_location"` UserLink string `json:"user_link"` ThumbnailLink string `json:"image_link"` AuthenticatedUser bool Text string }
type PasswordReset ¶
type TempSession ¶
type UnsplashRandomImageResponse ¶
type UnsplashRandomImageResponse struct { ID string `json:"id"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` Width int `json:"width"` Height int `json:"height"` Color string `json:"color"` BlurHash string `json:"blur_hash"` Downloads int `json:"downloads"` Likes int `json:"likes"` LikedByUser bool `json:"liked_by_user"` Description string `json:"description"` Exif struct { Make string `json:"make"` Model string `json:"model"` ExposureTime string `json:"exposure_time"` Aperture string `json:"aperture"` FocalLength string `json:"focal_length"` Iso int `json:"iso"` } `json:"exif"` Location struct { Name string `json:"name"` City string `json:"city"` Country string `json:"country"` Position struct { Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` } `json:"position"` } `json:"location"` CurrentUserCollections []struct { ID int `json:"id"` Title string `json:"title"` PublishedAt string `json:"published_at"` LastCollectedAt string `json:"last_collected_at"` UpdatedAt string `json:"updated_at"` CoverPhoto interface{} `json:"cover_photo"` User interface{} `json:"user"` } `json:"current_user_collections"` Urls struct { Raw string `json:"raw"` Full string `json:"full"` Regular string `json:"regular"` Small string `json:"small"` Thumb string `json:"thumb"` } `json:"urls"` Links struct { Self string `json:"self"` HTML string `json:"html"` Download string `json:"download"` DownloadLocation string `json:"download_location"` } `json:"links"` User struct { ID string `json:"id"` UpdatedAt string `json:"updated_at"` Username string `json:"username"` Name string `json:"name"` PortfolioURL string `json:"portfolio_url"` Bio string `json:"bio"` Location string `json:"location"` TotalLikes int `json:"total_likes"` TotalPhotos int `json:"total_photos"` TotalCollections int `json:"total_collections"` InstagramUsername string `json:"instagram_username"` TwitterUsername string `json:"twitter_username"` Links struct { Self string `json:"self"` HTML string `json:"html"` Photos string `json:"photos"` Likes string `json:"likes"` Portfolio string `json:"portfolio"` } `json:"links"` } `json:"user"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.