core

package
v0.0.0-...-f5b748a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2019 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Render *render

Functions

func AWSClient

func AWSClient() *awsClient

func NewRedis

func NewRedis()

func NewRender

func NewRender(folder, vExt string) *render

func ShortID

func ShortID() *shortid.Shortid

Types

type HeaderMetaData

type HeaderMetaData struct {
	Title    string
	Desc     string
	SiteName string
}

type Mongo

type Mongo struct {
	// contains filtered or unexported fields
}

func Instance

func Instance() (*Mongo, error)

func NewMongo

func NewMongo(settings MongoSettings) *Mongo

func (*Mongo) Collection

func (mg *Mongo) Collection(collection string) (*mgo.Session, *mgo.Collection)

type MongoSettings

type MongoSettings struct {
	Host, Username, Password, Database string
}

type RedisClient

type RedisClient struct {
	Client   *redis.Client
	Addr     string
	Password string
	Database int
}
var RedisManager *RedisClient

func (*RedisClient) Delete

func (r *RedisClient) Delete(keys ...string) (int64, error)

func (*RedisClient) Exist

func (r *RedisClient) Exist(keys ...string) bool

Your keys count must match the exist amount or not all keys exist Exists in redis doesn't return what keys actually existed so this function is pretty basic

func (*RedisClient) Get

func (r *RedisClient) Get(key string) (string, error)

func (*RedisClient) Keys

func (r *RedisClient) Keys(pattern string) ([]string, error)

func (*RedisClient) Set

func (r *RedisClient) Set(key string, value interface{}, expiration time.Duration) *redis.StatusCmd

func (*RedisClient) TTL

func (r *RedisClient) TTL(key string) (time.Duration, error)

Directories

Path Synopsis
goth
battlenet
Package battlenet implements the OAuth2 protocol for authenticating users through Battle.net.
Package battlenet implements the OAuth2 protocol for authenticating users through Battle.net.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL