services

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 1, 2020 License: GPL-3.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPutioClient

func NewPutioClient() *putio.Client

NewPutioClient return a Put.io client

Types

type Cache

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

Cache describe the cache client

func NewCache

func NewCache(enable bool) *Cache

NewCache create a new cache client

func (*Cache) Get

func (c *Cache) Get(key string) (interface{}, bool)

Get return stored data at given key

func (*Cache) Set

func (c *Cache) Set(key string, data interface{})

Set store data at given key

type CacheInterface

type CacheInterface interface {
	Get(key string) (interface{}, bool)
	Set(key string, data interface{})
}

CacheInterface describe a cache client interface

type FirestoreClient

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

FirestoreClient describe a Google Cloud Firestore Client

func NewFirestoreClient

func NewFirestoreClient() (*FirestoreClient, error)

NewFirestoreClient declare a new Firestore Client

func (*FirestoreClient) GetUsers

func (s *FirestoreClient) GetUsers() (Users, error)

GetUsers return all saved users in database

type User

type User struct {
	Username string `mapstructure:"username"`
	Password string `mapstructure:"password"`
}

User describe an application user

type Users

type Users []*User

Users describe multiple users

Jump to

Keyboard shortcuts

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