internal/storage/redis¶
github.com/gamidoc/backend/internal/storage/redis
Types¶
Client¶
type Client struct {
SessionRepository¶
type SessionRepository struct {
Functions¶
Client.Close¶
func (c *Client) Close() error {
Client.Ping¶
func (c *Client) Ping(ctx context.Context) error {
Client.Raw¶
func (c *Client) Raw() *goredis.Client {
Client.Ready¶
func (c *Client) Ready(ctx context.Context) error {
New¶
func New(addr string) *Client {
NewSessionRepository¶
func NewSessionRepository(client *Client, ttl time.Duration) *SessionRepository {
SessionRepository.Create¶
func (r *SessionRepository) Create(ctx context.Context, input session.Session) (session.Session, error) {
SessionRepository.FindByID¶
func (r *SessionRepository) FindByID(ctx context.Context, id string) (session.Session, error) {
SessionRepository.FindWizardByID¶
func (r *SessionRepository) FindWizardByID(ctx context.Context, id string) (wizard.Status, error) {
SessionRepository.UpdatePDFURL¶
func (r *SessionRepository) UpdatePDFURL(ctx context.Context, id string, pdfURL string) (session.Session, error) {
SessionRepository.UpdateWizard¶
func (r *SessionRepository) UpdateWizard(ctx context.Context, id string, status wizard.Status) (session.Session, error) {