Documentation ¶
Index ¶
- Constants
- func EncodeMD5(value string) string
- func GenerateTokens(userId uuid.UUID, isSuperAdmin bool) (string, string, error)
- func GetBurndown(tx *gorm.DB, sprintId uuid.UUID) ([]*model.SprintBurndown, int, error)
- func GetOrgRole(org model.Org, orgUser []model.OrgUser, user model.User) generalv1.Role
- func GetProjectRole(project model.Project, user model.User) generalv1.Role
- func IsLegalName(name string) bool
- func IsOrgAdmin(org model.Org, orgUser []model.OrgUser, user model.User) bool
- func IsOrgMember(org model.Org, orgUser []model.OrgUser, user model.User) bool
- func IsProjectAdmin(project model.Project, user model.User) bool
- func IsProjectMember(project model.Project, user model.User) bool
- func IsSprintMember(sprintMembers []*projectv1.SprintMember, user model.User) bool
- func Pagination(oldPage, oldSize int32) (page, size int32)
- func ParseToken(token string) (jwt.MapClaims, error)
- func UpdateBurndown(tx *gorm.DB, sprintId uuid.UUID, correctDate time.Time, taskCount int32, ...) error
- type Options
- type UserClaims
Constants ¶
View Source
const ( ErrNotProjectMember = "You are not a member of this project" ErrNotOrgMember = "You are not a member of this organization" ErrNotOrgAdmin = "You are not an admin of this organization" ErrNoAdminPermissionForProject = "You do not have permission to perform this operation on this project" ErrReachOrgLimit = "You have reached the organization limit" ErrReachProjectLimit = "You have reached the project limit" )
Variables ¶
This section is empty.
Functions ¶
func GenerateTokens ¶
func GetBurndown ¶
func GetOrgRole ¶
func IsLegalName ¶
func IsSprintMember ¶
func IsSprintMember(sprintMembers []*projectv1.SprintMember, user model.User) bool
func Pagination ¶
Types ¶
type UserClaims ¶
type UserClaims struct { Id uuid.UUID `json:"id"` IsSuperAdmin bool `json:"is_super_admin"` ExpirationTime time.Time `json:"exp"` }
func GetTokenDetails ¶
func GetTokenDetails(ctx context.Context) (UserClaims, error)
Click to show internal directories.
Click to hide internal directories.