internal

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRandomString

func CreateRandomString(size int) string

CreateRandomString creates a random string of `size`.

func IsNil

func IsNil(v interface{}) bool

IsNil checks is the provided interface is nil-valued or not.

func IsSubsetSlice

func IsSubsetSlice(first, second []string) bool

IsSubsetSlice checks if the first slice is a subset of the second one.

func RecalculateAverage

func RecalculateAverage(new, avg float64, count int) float64

RecalculateAverage recalculates an average by including a new value using the running average method.

Types

type RedisCertificateCache

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

RedisCertificateCache is used to store program certificate data inside redis.

func NewCache

func NewCache() (*RedisCertificateCache, error)

NewCache initializes a new RedisCertificateCache struct.

func (*RedisCertificateCache) Delete

func (r *RedisCertificateCache) Delete(ctx context.Context, key string) error

Delete removes the data stored at the given key.

func (*RedisCertificateCache) Get

func (r *RedisCertificateCache) Get(ctx context.Context, key string) ([]byte, error)

Get returns corresponding value for the key in the datastore.

func (*RedisCertificateCache) Put

func (r *RedisCertificateCache) Put(ctx context.Context, key string, data []byte) error

Put stores the corresponding data in the datastore.

Directories

Path Synopsis
database
sql

Jump to

Keyboard shortcuts

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