27 lines
695 B
Go

package repository
import "git.markbailey.dev/cervers/ptpp/lib/database/dto"
type IHeartbeat interface {
CreateHeartbeat(h *dto.Heartbeat) (*dto.Heartbeat, error)
FindHeartbeatByID(id int64) (*dto.Heartbeat, error)
FindHeartbeatByUser(u dto.User) ([]*dto.Heartbeat, error)
}
type IUser interface {
CreateUser(u dto.User) (*dto.User, error)
FindUserByUsername(username string) (*dto.User, error)
}
type IOrganization interface {
CreateOrganization(o dto.Organization) (*dto.Organization, error)
FindOrganizationByName(name string) (*dto.Organization, error)
FindOrganizationById(id int64) (*dto.Organization, error)
}
type IRepository interface {
IHeartbeat
IUser
IOrganization
}