session

package
v0.0.0-...-f02a2e5 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository struct {
	DB  *sql.DB
	Log *zap.Logger
}

Repository is a struct to store DB and logger connection

func (*Repository) Create

Create new entity in storage

func (*Repository) Delete

func (r *Repository) Delete(id int64, ctx context.Context) error

Delete entity in storage

func (*Repository) Retrieve

func (r *Repository) Retrieve(id int64, ctx context.Context) (internal.Identifiable, error)

Retrieve entity from storage

func (*Repository) RetrieveAll

func (r *Repository) RetrieveAll(ctx context.Context) ([]internal.Identifiable, error)

RetrieveAll entity from storage

func (*Repository) TimeValid

func (r *Repository) TimeValid(i internal.Identifiable, ctx context.Context) (bool, error)

type Resource

type Resource struct {
	ID        int64  `json:"ID"`
	Hall_id   int64  `json:"hall_id,omitempty"`
	Movie_id  int64  `json:"movie_id,omitempty"`
	Starts_at string `json:"Starts_at"`
	VIP       bool   `json:"VIP"`
	Name      string `json:"Movie name"`
}

Resource is a struct to store data about entity

func (*Resource) GID

func (r *Resource) GID() int64

Jump to

Keyboard shortcuts

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