team

package
v0.0.0-...-987a61a Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const UNASSIGNED_PROJECT = "unassigned"

Variables

This section is empty.

Functions

This section is empty.

Types

type Team

type Team struct {
	Id     int    `sql:"id,pk"`
	Name   string `sql:"name,notnull"`
	Active bool   `sql:"active,notnull"`
	sql.AuditLog
	// contains filtered or unexported fields
}

type TeamBean

type TeamBean struct {
	Id   int    `json:"id"`
	Name string `json:"name,notnull"`
}

type TeamRbacObjects

type TeamRbacObjects struct {
	AppName  string `json:"appName"`
	TeamName string `json:"teamName"`
	AppId    int    `json:"appId"`
}

type TeamRepository

type TeamRepository interface {
	Save(team *Team) error
	FindAllActive() ([]Team, error)
	FindOne(id int) (Team, error)
	FindByTeamName(name string) (Team, error)
	Update(team *Team) error
	MarkTeamDeleted(team *Team, tx *pg.Tx) error
	GetConnection() *pg.DB
	FindByIds(ids []*int) ([]*Team, error)
}

type TeamRepositoryImpl

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

func NewTeamRepositoryImpl

func NewTeamRepositoryImpl(dbConnection *pg.DB) *TeamRepositoryImpl

func (TeamRepositoryImpl) FindAllActive

func (impl TeamRepositoryImpl) FindAllActive() ([]Team, error)

func (TeamRepositoryImpl) FindByIds

func (repo TeamRepositoryImpl) FindByIds(ids []*int) ([]*Team, error)

func (TeamRepositoryImpl) FindByTeamName

func (impl TeamRepositoryImpl) FindByTeamName(name string) (Team, error)

func (TeamRepositoryImpl) FindOne

func (impl TeamRepositoryImpl) FindOne(id int) (Team, error)

func (TeamRepositoryImpl) GetConnection

func (repo TeamRepositoryImpl) GetConnection() *pg.DB

func (TeamRepositoryImpl) MarkTeamDeleted

func (impl TeamRepositoryImpl) MarkTeamDeleted(team *Team, tx *pg.Tx) error

func (TeamRepositoryImpl) Save

func (impl TeamRepositoryImpl) Save(team *Team) error

func (TeamRepositoryImpl) Update

func (impl TeamRepositoryImpl) Update(team *Team) error

type TeamRequest

type TeamRequest struct {
	Id     int    `json:"id,omitempty" validate:"number"`
	Name   string `json:"name,omitempty" validate:"required"`
	Active bool   `json:"active"`
	UserId int32  `json:"-"`
}

type TeamService

type TeamService interface {
	Create(request *TeamRequest) (*TeamRequest, error)
	FetchAllActive() ([]TeamRequest, error)
	FetchOne(id int) (*TeamRequest, error)
	Update(request *TeamRequest) (*TeamRequest, error)
	Delete(request *TeamRequest) error
	FetchForAutocomplete() ([]TeamRequest, error)
	FindByIds(ids []*int) ([]*TeamBean, error)
	FindByTeamName(teamName string) (*TeamRequest, error)
}

type TeamServiceImpl

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

func NewTeamServiceImpl

func NewTeamServiceImpl(logger *zap.SugaredLogger, teamRepository TeamRepository,
	userAuthService user.UserAuthService) *TeamServiceImpl

func (TeamServiceImpl) Create

func (impl TeamServiceImpl) Create(request *TeamRequest) (*TeamRequest, error)

func (TeamServiceImpl) Delete

func (impl TeamServiceImpl) Delete(deleteRequest *TeamRequest) error

func (TeamServiceImpl) FetchAllActive

func (impl TeamServiceImpl) FetchAllActive() ([]TeamRequest, error)

func (TeamServiceImpl) FetchForAutocomplete

func (impl TeamServiceImpl) FetchForAutocomplete() ([]TeamRequest, error)

func (TeamServiceImpl) FetchOne

func (impl TeamServiceImpl) FetchOne(teamId int) (*TeamRequest, error)

func (TeamServiceImpl) FindByIds

func (impl TeamServiceImpl) FindByIds(ids []*int) ([]*TeamBean, error)

func (TeamServiceImpl) FindByTeamName

func (impl TeamServiceImpl) FindByTeamName(teamName string) (*TeamRequest, error)

func (TeamServiceImpl) Update

func (impl TeamServiceImpl) Update(request *TeamRequest) (*TeamRequest, error)

Jump to

Keyboard shortcuts

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