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: 0

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