domain

package
v0.0.0-...-dd30ea9 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PERMISSION_BROWSE_PROJECT string = "BROWSE_PROJECT"

	PERMISSION_CREATE_ISSUE  string = "CREATE_ISSUE"
	PERMISSION_EDIT_ISSUE    string = "EDIT_ISSUE"
	PERMISSION_DELETE_ISSUE  string = "DELETE_ISSUE"
	PERMISSION_RESOLVE_ISSUE string = "RESOLVE_ISSUE"

	PERMISSION_ASSIGN_USER     string = "ASSIGN_USER"
	PERMISSION_CHANGE_REPORTER string = "CHANGE_REPORTER"
	PERMISSION_CHANGE_DUEDATE  string = "CHANGE_DUEDATE"

	PERMISSION_ADD_ATTACHMENT        string = "ADD_ATTACHMENT"
	PERMISSION_DELETE_OWN_ATTACHMENT string = "DELETE_OWN_ATTACHMENT"
	PERMISSION_DELETE_ALL_ATTACHMENT string = "DELETE_ALL_ATTACHMENT"

	PERMISSION_ADD_COMMENT        string = "ADD_COMMENT"
	PERMISSION_EDIT_OWN_COMMENT   string = "EDIT_OWN_COMMENT"
	PERMISSION_DELETE_OWN_COMMENT string = "DELETE_OWN_COMMENT"

	PERMISSION_EDIT_ALL_COMMENT   string = "EDIT_ALL_COMMENT"
	PERMISSION_DELETE_ALL_COMMENT string = "DELETE_ALL_COMMENT"

	PERMISSION_ADD_WORKLOG        string = "ADD_WORKLOG"
	PERMISSION_DELETE_OWN_WORKLOG string = "DELETE_OWN_WORKLOG"
	PERMISSION_DELETE_ALL_WORKLOG string = "DELETE_ALL_WORKLOG"

	PERMISSION_SUBSCRIBE_ISSUE    string = "SUBSCRIBE_ISSUE"
	PERMISSION_UNSUBSCRIBE_ISSUE  string = "UNSUBSCRIBE_ISSUE"
	PERMISSION_SUBSCRIBE_OTHERS   string = "SUBSCRIBE_OTHERS"
	PERMISSION_UNSUBSCRIBE_OTHERS string = "UNSUBSCRIBE_OTHERS"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DocumentMetadata

type DocumentMetadata struct {
	DocumentType string `json:"documentType" db:"-"`
	FriendName   string `json:"friendName" db:"-"`
	Id           string `json:"id" db:"-"`
}

type FileItem

type FileItem struct {
	Id          string            `json:"id"`
	IdUser      string            `json:"-"`
	Bytes       int64             `json:"bytes"`
	Extension   string            `json:"extension"`
	Name        string            `json:"name"`
	DateCreated time.Time         `json:"dateCreated"`
	User        *User             `json:"user" db:"-"`
	Meta        *DocumentMetadata `json:"meta" db:"-"`
	MimeType    string            `json:"mimeType"`
	FileData    []byte            `json:"-"`
}

func (FileItem) GetMeta

func (u FileItem) GetMeta() *DocumentMetadata

func (*FileItem) Initialize

func (u *FileItem) Initialize()

func (*FileItem) Validate

func (u *FileItem) Validate() (err error)

type Group

type Group struct {
	Meta         *DocumentMetadata `json:"meta" db:"-"`
	Id           string            `json:"id"`
	Name         string            `json:"name"`
	DateCreated  time.Time         `json:"dateCreated"`
	LastModified *time.Time        `json:"lastModified"`
}

func (*Group) Initialize

func (t *Group) Initialize()

func (*Group) Validate

func (u *Group) Validate() (err error)

type Issue

type Issue struct {
	Meta            *DocumentMetadata `json:"meta" db:"-"`
	Id              string            `json:"id"`
	IdParent        sql.NullString    `json:"-"`
	Pkey            string            `json:"pkey"`
	Name            string            `json:"name"`
	Description     string            `json:"description"`
	DateCreated     time.Time         `json:"dateCreated"`
	LastModified    *time.Time        `json:"lastModified"`
	IdStatus        string            `json:"-"`
	IdWorkflow      string            `json:"-"`
	IdPriority      string            `json:"-"`
	IdProject       sql.NullString    `json:"-"`
	IdAssignee      sql.NullString    `json:"-"`
	IdReporter      string            `json:"-"`
	DueDate         time.Time         `json:"dueDate"`
	ResolvedDate    *time.Time        `json:"resolvedDate"`
	CancelledDate   *time.Time        `json:"cancelledDate"`
	Status          *Status           `json:"status" db:"-"`
	Priority        *Priority         `json:"priority" db:"-"`
	Project         *Project          `json:"project" db:"-"`
	Assignee        *User             `json:"assignee" db:"-"`
	Reporter        *User             `json:"reporter" db:"-"`
	Workflow        *Workflow         `json:"workflow" db:"-"`
	DocumentRelated *DocumentMetadata `json:"documentRelated" db:"-"`
}

func (*Issue) AcceptUpdates

func (u *Issue) AcceptUpdates() bool

func (*Issue) GetId

func (u *Issue) GetId() string

func (*Issue) GetMeta

func (u *Issue) GetMeta() *DocumentMetadata

func (*Issue) Initialize

func (u *Issue) Initialize()

func (*Issue) Validate

func (u *Issue) Validate() (err error)

type IssueAttachment

type IssueAttachment struct {
	Id          string            `json:"id"`
	Meta        *DocumentMetadata `json:"meta" db:"-"`
	DateCreated time.Time         `json:"dateCreated"`
	IdIssue     string            `json:"-"`
	IdFileItem  string            `json:"-"`
	IdUser      string            `json:"-"`
	FileItem    *FileItem         `json:"fileItem" db:"-"`
	User        *User             `json:"user" db:"-"`
	Issue       *Issue            `json:"issue" db:"-"`
}

func (IssueAttachment) GetId

func (u IssueAttachment) GetId() string

func (IssueAttachment) GetMeta

func (u IssueAttachment) GetMeta() *DocumentMetadata

func (*IssueAttachment) Initialize

func (u *IssueAttachment) Initialize()

func (*IssueAttachment) Validate

func (u *IssueAttachment) Validate() (err error)

type IssueComment

type IssueComment struct {
	Id           string            `json:"id"`
	Meta         *DocumentMetadata `json:"meta" db:"-"`
	DateCreated  time.Time         `json:"dateCreated"`
	LastModified *time.Time        `json:"lastModified"`
	IdIssue      string            `json:"-"`
	IdUser       string            `json:"-"`
	Body         string            `json:"body"`
	User         *User             `json:"user" db:"-"`
	Issue        *Issue            `json:"issue" db:"-"`
}

func (IssueComment) GetId

func (u IssueComment) GetId() string

func (IssueComment) GetMeta

func (u IssueComment) GetMeta() *DocumentMetadata

func (*IssueComment) Initialize

func (u *IssueComment) Initialize()

func (*IssueComment) Validate

func (u *IssueComment) Validate() (err error)

type IssueSubscription

type IssueSubscription struct {
	Id          string    `json:"-"`
	DateCreated time.Time `json:"dateCreated"`
	IdIssue     string    `json:"idIssue"`
	IdUser      string    `json:"idUser"`
	Issue       *Issue    `json:"issue" db:"-"`
	User        *User     `json:"user" db:"-"`
}

func (*IssueSubscription) Initialize

func (u *IssueSubscription) Initialize()

type PermissionName

type PermissionName struct {
	Meta *DocumentMetadata `json:"meta" db:"-"`
	Id   string            `json:"id"`
	Name string            `json:"name"`
}

func (*PermissionName) Initialize

func (u *PermissionName) Initialize()

func (*PermissionName) Permissions

func (t *PermissionName) Permissions() map[string]string

returns all the permission names the key is the constant name, and the content is the db name

type PermissionScheme

type PermissionScheme struct {
	Meta *DocumentMetadata `json:"meta" db:"-"`
	Id   string            `json:"id"`
	Name string            `json:"name"`
}

func (*PermissionScheme) Initialize

func (u *PermissionScheme) Initialize()

func (*PermissionScheme) Validate

func (u *PermissionScheme) Validate() (err error)

type PermissionSchemeItem

type PermissionSchemeItem struct {
	Id                 string            `json:"id"`
	IdPermissionScheme string            `json:"-"`
	IdPermissionName   string            `json:"-"`
	IdRole             sql.NullString    `json:"-"`
	IdGroup            sql.NullString    `json:"-"`
	IdUser             sql.NullString    `json:"-"`
	User               *User             `json:"user" db:"-"`
	Group              *Group            `json:"group" db:"-"`
	Role               *Role             `json:"role" db:"-"`
	PermissionScheme   *PermissionScheme `json:"permissionScheme" db:"-"`
	PermissionName     *PermissionName   `json:"permissionName" db:"-"`
}

func (*PermissionSchemeItem) Initialize

func (u *PermissionSchemeItem) Initialize()

func (*PermissionSchemeItem) Validate

func (u *PermissionSchemeItem) Validate() (err error)

type Priority

type Priority struct {
	Meta         *DocumentMetadata `json:"meta" db:"-"`
	Id           string            `json:"id"`
	Name         string            `json:"name"`
	DateCreated  time.Time         `json:"dateCreated"`
	LastModified *time.Time        `json:"lastModified"`
}

func (*Priority) Initialize

func (u *Priority) Initialize()

func (*Priority) Validate

func (u *Priority) Validate() (err error)

type Project

type Project struct {
	Meta               *DocumentMetadata `json:"meta" db:"-"`
	Id                 string            `json:"id"`
	Pkey               string            `json:"pkey"`
	Name               string            `json:"name"`
	IdProjectLead      string            `json:"-"`
	DateCreated        time.Time         `json:"dateCreated"`
	LastModified       *time.Time        `json:"lastModified"`
	Begins             *time.Time        `json:"begins"`
	Ends               *time.Time        `json:"ends"`
	Next               int64             `json:"next"`
	ProjectLead        *User             `json:"projectLead" db:"-"`
	IssueCount         int32             `json:"issueCount"`
	NotResolvedCount   int32             `json:"notResolvedCount"`
	IdPermissionScheme sql.NullString    `json:"-"`
	PermissionScheme   *PermissionScheme `json:"permissionScheme" db:"-"`
}

func (Project) GetId

func (u Project) GetId() string

func (Project) GetMeta

func (u Project) GetMeta() *DocumentMetadata

func (*Project) Initialize

func (u *Project) Initialize()

func (*Project) IssueKey

func (u *Project) IssueKey() string

func (*Project) Validate

func (u *Project) Validate() (err error)

type ProjectRole

type ProjectRole struct {
	Meta      *DocumentMetadata `json:"meta" db:"-"`
	Id        string            `json:"id"`
	IdProject string            `json:"-"`
	IdRole    string            `json:"-"`
	Project   *Project          `json:"project" db:"-"`
	Role      *Role             `json:"role" db:"-"`
}

func (*ProjectRole) Initialize

func (u *ProjectRole) Initialize()

func (*ProjectRole) Validate

func (u *ProjectRole) Validate() (err error)

type ProjectRoleMember

type ProjectRoleMember struct {
	Id            string         `json:"id"`
	IdProjectRole string         `json:"-"`
	IdGroup       sql.NullString `json:"-"`
	IdUser        sql.NullString `json:"-"`
	Group         *Group         `json:"group" db:"-"`
	User          *User          `json:"user" db:"-"`
	ProjectRole   *ProjectRole   `json:"projectRole" db:"-"`
}

func (*ProjectRoleMember) Initialize

func (u *ProjectRoleMember) Initialize()

func (*ProjectRoleMember) Validate

func (u *ProjectRoleMember) Validate() (err error)

type Role

type Role struct {
	Meta *DocumentMetadata `json:"meta" db:"-"`
	Id   string            `json:"id"`
	Name string            `json:"name"`
}

func (*Role) Initialize

func (u *Role) Initialize()

func (*Role) Validate

func (u *Role) Validate() (err error)

type Session

type Session struct {
	Id          string    `json:"id"`
	IdUser      string    `json:"-"`
	User        *User     `json:"user" db:"-"`
	DateCreated time.Time `json:"dateCreated"`
	Expires     time.Time `json:"expires"`
	IpAddress   string    `json:"ipAddress"`
}

func (*Session) Expiration

func (u *Session) Expiration() time.Duration

func (*Session) Initialize

func (u *Session) Initialize()

func (*Session) Validate

func (u *Session) Validate() error

type Status

type Status struct {
	Id           string     `json:"id"`
	IdWorkflow   string     `json:"-"`
	Name         string     `json:"name"`
	Description  string     `json:"description"`
	DateCreated  time.Time  `json:"dateCreated"`
	LastModified *time.Time `json:"lastModified"`
	Workflow     *Workflow  `json:"workflow" db:"-"`
}

func (*Status) Initialize

func (u *Status) Initialize()

func (*Status) Validate

func (u *Status) Validate() (err error)

type User

type User struct {
	Id                    string            `json:"id"`
	LastName              string            `json:"lastName"`
	Name                  string            `json:"name"`
	Email                 string            `json:"email"`
	Password              string            `json:"-"`
	TokenEmail            string            `json:"tokenEmail"`
	TokenExpires          time.Time         `json:"tokenExpires"`
	LoginCount            int               `json:"loginCount"`
	LastLogin             *time.Time        `json:"lastLogin"`
	IsActive              bool              `json:"isActive"`
	IsSystemAdministrator bool              `json:"isSystemAdministrator"`
	DateCreated           time.Time         `json:"dateCreated"`
	LastModified          *time.Time        `json:"lastModified"`
	Meta                  *DocumentMetadata `json:"meta" db:"-"`
	Metadata              *UserMeta         `json:"metadata" db:"-"`
}

func (*User) FullName

func (u *User) FullName() string

func (*User) GetId

func (u *User) GetId() string

func (User) GetMeta

func (u User) GetMeta() *DocumentMetadata

func (*User) Initialize

func (u *User) Initialize()

func (*User) Validate

func (u *User) Validate() (err error)

type UserGroup

type UserGroup struct {
	Id      string `json:"-"`
	IdUser  string `json:"-"`
	IdGroup string `json:"-"`
	User    *User  `json:"user" db:"-"`
	Group   *Group `json:"group" db:"-"`
}

func (*UserGroup) Validate

func (u *UserGroup) Validate()

type UserMeta

type UserMeta struct {
	Id                    string `json:"id"`
	IdUser                string `json:"-"`
	EmailNotifications    bool   `json:"emailNotifications"`
	RealTimeNotifications bool   `json:"realTimeNotifications"`
	RecieveOwnChanges     bool   `json:"recieveOwnChanges"`
}

func (*UserMeta) Initialize

func (u *UserMeta) Initialize()

type Workflow

type Workflow struct {
	Meta         *DocumentMetadata `json:"meta" db:"-"`
	Id           string            `json:"id"`
	Name         string            `json:"name"`
	DateCreated  time.Time         `json:"dateCreated"`
	LastModified *time.Time        `json:"lastModified"`
}

func (*Workflow) Initialize

func (u *Workflow) Initialize()

func (*Workflow) Validate

func (u *Workflow) Validate() (err error)

type WorkflowStep

type WorkflowStep struct {
	Id           string         `json:"id"`
	Name         string         `json:"name"`
	IdWorkflow   string         `json:"-"`
	IdPrevStatus sql.NullString `json:"-"`
	IdNextStatus string         `json:"-"`
	DateCreated  time.Time      `json:"dateCreated"`
	Resolves     bool           `json:"resolves"`
	Cancels      bool           `json:"cancels"`
	PrevStatus   *Status        `json:"prevStatus" db:"-"`
	NextStatus   *Status        `json:"nextStatus" db:"-"`
	Workflow     *Workflow      `json:"workflow" db:"-"`
}

func (*WorkflowStep) Initialize

func (u *WorkflowStep) Initialize()

func (*WorkflowStep) Validate

func (u *WorkflowStep) Validate() (err error)

type WorkflowStepMember

type WorkflowStepMember struct {
	Id             string         `json:"id"`
	IdWorkflowStep string         `json:"-"`
	IdUser         sql.NullString `json:"-"`
	IdGroup        sql.NullString `json:"-"`
	WorkflowStep   *WorkflowStep  `json:"workflowStep" db:"-"`
	User           *User          `json:"user" db:"-"`
	Group          *Group         `json:"group" db:"-"`
}

func (*WorkflowStepMember) Initialize

func (u *WorkflowStepMember) Initialize()

func (*WorkflowStepMember) Validate

func (u *WorkflowStepMember) Validate() (err error)

Jump to

Keyboard shortcuts

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