repositories

package
v0.0.0-...-245198b Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2020 License: LGPL-2.1 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommentRepo

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

func NewCommentRepo

func NewCommentRepo(db *sqlx.DB) *CommentRepo

func (CommentRepo) CreateComment

func (r CommentRepo) CreateComment(request *models.NewCommentRequest) (sql.Result, error)

func (CommentRepo) FindCommentsByTicketID

func (r CommentRepo) FindCommentsByTicketID(ID int) (*[]models.Comment, error)

type SessionRepo

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

func NewSessionRepo

func NewSessionRepo(db *sqlx.DB) *SessionRepo

func (SessionRepo) CreateSession

func (r SessionRepo) CreateSession(userID int) (*models.Session, error)

func (SessionRepo) DeleteSession

func (r SessionRepo) DeleteSession(sessionID string) (res sql.Result, err error)

func (SessionRepo) GetSessionUser

func (r SessionRepo) GetSessionUser(sessionID string) (int, bool)

func (SessionRepo) IsSessionValid

func (r SessionRepo) IsSessionValid(sessionID string) (exists bool, fresh bool)

type TeamRepo

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

func NewTeamRepo

func NewTeamRepo(db *sqlx.DB) *TeamRepo

func (*TeamRepo) CreateTeam

func (r *TeamRepo) CreateTeam(teamInfo *models.TeamRequest) (sql.Result, error)

func (*TeamRepo) FindByID

func (r *TeamRepo) FindByID(ID int) (*models.TeamResponse, error)

func (*TeamRepo) FindByName

func (r *TeamRepo) FindByName(name string) (*[]models.Team, error)

func (*TeamRepo) GetAllTeams

func (r *TeamRepo) GetAllTeams() (*[]models.Team, error)

func (*TeamRepo) UpdateTeam

func (r *TeamRepo) UpdateTeam(team *models.Team) error

type TicketRepo

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

func NewTicketRepo

func NewTicketRepo(db *sqlx.DB) *TicketRepo

func (*TicketRepo) CreateTicket

func (r *TicketRepo) CreateTicket(ticket *models.NewTicketRequest) (sql.Result, error)

func (*TicketRepo) FindByID

func (r *TicketRepo) FindByID(ID int) (*[]models.Ticket, error)

func (*TicketRepo) GetAllTickets

func (r *TicketRepo) GetAllTickets() (*[]models.Ticket, error)

func (*TicketRepo) UpdateTicket

func (r *TicketRepo) UpdateTicket(ticket *models.Ticket) error

type UserRepo

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

func NewUserRepo

func NewUserRepo(db *sqlx.DB) *UserRepo

func (UserRepo) CreateUser

func (r UserRepo) CreateUser(request *models.NewUserRequest) (res sql.Result, err error)

func (UserRepo) FindByID

func (r UserRepo) FindByID(ID int) (*[]models.User, error)

func (UserRepo) GetAllUsers

func (r UserRepo) GetAllUsers() (*[]models.User, error)

func (UserRepo) GetHashByEmail

func (r UserRepo) GetHashByEmail(email string) (*models.UserHash, error)

func (UserRepo) GetHashByID

func (r UserRepo) GetHashByID(ID int) (*models.UserHash, error)

func (UserRepo) GetUsersByName

func (r UserRepo) GetUsersByName(sUserName string) (*[]models.User, error)

func (UserRepo) UpdateByID

func (r UserRepo) UpdateByID(uUser *models.UpdateUserSQL) (res sql.Result, err error)

func (UserRepo) UpdateTeam

func (r UserRepo) UpdateTeam(userId int, teamId sql.NullInt32) (sql.Result, error)

func (UserRepo) UsernameOrEmailExists

func (r UserRepo) UsernameOrEmailExists(name, email string) bool

Jump to

Keyboard shortcuts

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