Documentation
¶
Index ¶
- Variables
- func CatchPanic(title string)
- func InitLogger() error
- func IsEmptyUUID(u uuid.UUID) bool
- func IsValidObject(body interface{}, objScheme map[string]interface{}) error
- func PrettyPrint(v interface{}) (err error)
- type Backup
- type File
- type GoogleDrive
- type IPLocation
- type Request
- type S3Config
- func (a *S3Config) Init(key, secret, region, host, bucket string)
- func (a *S3Config) UploadBase64(base64Image, destination string) (string, error)
- func (a *S3Config) UploadFile(bucket, destination, imgType string, buffer []byte) (string, error)
- func (a *S3Config) UploadJpeg(m image.Image, destination string) (string, error)
- func (a *S3Config) UploadPng(m image.Image, destination string) (string, error)
- type SqlQuery
- func (q *SqlQuery) Fetch(obj interface{}) (next bool, err error)
- func (q *SqlQuery) FetchAll(obj interface{}) ([]interface{}, error)
- func (q *SqlQuery) First(obj interface{}) error
- func (q *SqlQuery) ToList() ([]map[string]interface{}, error)
- func (q *SqlQuery) Total() int
- func (q *SqlQuery) Write(w http.ResponseWriter, start, end string, obj interface{}) (err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var AdminBot = &adminBot{}
View Source
var Mail = &mailSender{}
View Source
var S3 = &S3Config{}
Functions ¶
func CatchPanic ¶
func CatchPanic(title string)
func InitLogger ¶
func InitLogger() error
func IsEmptyUUID ¶
func IsValidObject ¶
func PrettyPrint ¶
func PrettyPrint(v interface{}) (err error)
Types ¶
type Backup ¶
type GoogleDrive ¶
type GoogleDrive struct {
CredentialPath, TokenPath string
Service *drive.Service
}
func (*GoogleDrive) Init ¶
func (g *GoogleDrive) Init() (err error)
type IPLocation ¶
type IPLocation struct { Country string `json:"country"` IP string `json:"ip"` Postal string `json:"postal"` Lat float64 `json:"lat"` Lon float64 `json:"lon"` Timezone string `json:"timezone"` Org string `json:"org"` City string `json:"city"` Hostname string `json:"hostname"` Region string `json:"region"` Loc string `json:"loc"` }
func GetIPLocation ¶
func GetIPLocation(ip string) (*IPLocation, error)
type Request ¶
type S3Config ¶
type S3Config struct {
Key, Secret, Region, Host, Bucket string
}
func (*S3Config) UploadBase64 ¶
func (*S3Config) UploadFile ¶
func (*S3Config) UploadJpeg ¶
type SqlQuery ¶
type SqlQuery struct {
// contains filtered or unexported fields
}
func NewSqlFromFile ¶
Click to show internal directories.
Click to hide internal directories.