Documentation ¶
Index ¶
- func InitModels()
- type Manager
- func (m *Manager) AddVersion(username string, globalID string, uniqueID string, seeVersion *SeeVersion) error
- func (m *Manager) Create(see *See) error
- func (m *Manager) GetSeeObject(username string, globalID string, uniqueID string) (seeObject *See, err error)
- func (m *Manager) GetSeeObjects(username string) (seeObjects []See, err error)
- func (m *Manager) GetSeeObjectsByOrganization(username string, globalID string) (seeObjects []See, err error)
- func (m *Manager) Update(see *See) error
- type See
- type SeeVersion
- type SeeView
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is used to store users
func NewManager ¶
NewManager creates and initializes a new Manager
func (*Manager) AddVersion ¶
func (m *Manager) AddVersion(username string, globalID string, uniqueID string, seeVersion *SeeVersion) error
AddVersion adds a new version to the object
func (*Manager) GetSeeObject ¶
func (m *Manager) GetSeeObject(username string, globalID string, uniqueID string) (seeObject *See, err error)
GetSeeObject returns a see object
func (*Manager) GetSeeObjects ¶
GetSeeObjects returns all see object for a specific username
type See ¶
type See struct { ID bson.ObjectId `json:"-" bson:"_id,omitempty"` Username string `json:"username"` Globalid string `json:"globalid"` Uniqueid string `json:"uniqueid" validate:"max=100,nonzero"` Versions []SeeVersion `json:"versions"` }
func (*See) ConvertToSeeView ¶
type SeeVersion ¶
type SeeVersion struct { Version int `json:"version" bson:"-"` Category string `json:"category" validate:"max=100,nonzero"` Link string `json:"link" validate:"nonzero"` ContentType string `json:"content_type"` MarkdownShortDescription string `json:"markdown_short_description" validate:"max=500,nonzero"` MarkdownFullDescription string `json:"markdown_full_description" validate:"nonzero"` CreationDate *db.DateTime `json:"creation_date"` StartDate *db.DateTime `json:"start_date,omitempty" bson:"startdate,omitempty"` EndDate *db.DateTime `json:"end_date,omitempty" bson:"enddate,omitempty"` KeyStoreLabel string `json:"keystore_label"` Signature string `json:"signature"` }
type SeeView ¶
type SeeView struct { SeeVersion Username string `json:"username"` Globalid string `json:"globalid"` Uniqueid string `json:"uniqueid" validate:"max=100,nonzero"` }
func (*SeeView) ConvertToSeeVersion ¶
func (s *SeeView) ConvertToSeeVersion() *SeeVersion
Click to show internal directories.
Click to hide internal directories.