adapters

package
v0.0.0-...-a2f079e Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CassandraShortUrlRepository

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

func NewCassandraShortUrlRepository

func NewCassandraShortUrlRepository(session *gocqlx.Session) *CassandraShortUrlRepository

func (*CassandraShortUrlRepository) CreateShortUrl

func (r *CassandraShortUrlRepository) CreateShortUrl(_ context.Context, sURL *shorturl.ShortUrl) error

func (*CassandraShortUrlRepository) DeleteShortUrl

func (r *CassandraShortUrlRepository) DeleteShortUrl(_ context.Context, shortUrlId string) error

func (*CassandraShortUrlRepository) GetShortUrl

func (r *CassandraShortUrlRepository) GetShortUrl(_ context.Context, shortUrlId string) (*shorturl.ShortUrl, error)

type KeyGrpc

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

func NewKeyGrpc

func NewKeyGrpc(client kgs_grpc.KeyServiceClient) KeyGrpc

func (KeyGrpc) DeleteKeys

func (s KeyGrpc) DeleteKeys(ctx context.Context, keys []string) error

func (KeyGrpc) GenerateKey

func (s KeyGrpc) GenerateKey(ctx context.Context) (string, error)

return generated key

type RedisCacheShortUrlRepository

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

func NewRedisCacheShortUrlRepository

func NewRedisCacheShortUrlRepository(client redis.UniversalClient) *RedisCacheShortUrlRepository

func (*RedisCacheShortUrlRepository) AddShortUrlCache

func (r *RedisCacheShortUrlRepository) AddShortUrlCache(ctx context.Context, sUrl *shorturl.ShortUrl) error

func (*RedisCacheShortUrlRepository) GetShortUrlCache

func (r *RedisCacheShortUrlRepository) GetShortUrlCache(ctx context.Context, shortUrlId string) (string, error)

Jump to

Keyboard shortcuts

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