Not in catalog strategy
This commit is contained in:
@@ -31,6 +31,7 @@ const (
|
||||
*/
|
||||
type AbstractObject struct {
|
||||
UUID string `json:"id,omitempty" bson:"id,omitempty" validate:"required"`
|
||||
NotInCatalog bool `json:"not_in_catalog" bson:"not_in_catalog" default:"false"`
|
||||
Name string `json:"name,omitempty" bson:"name,omitempty" validate:"required"`
|
||||
IsDraft bool `json:"is_draft" bson:"is_draft" default:"false"`
|
||||
CreatorID string `json:"creator_id,omitempty" bson:"creator_id,omitempty"`
|
||||
@@ -47,6 +48,10 @@ func (ri *AbstractObject) GetAccessor(request *tools.APIRequest) Accessor {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (r *AbstractObject) IsNotInCatalog() bool {
|
||||
return r.NotInCatalog
|
||||
}
|
||||
|
||||
func (r *AbstractObject) Unsign() {
|
||||
r.Signature = nil
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ type ShallowDBObject interface {
|
||||
// DBObject is an interface that defines the basic methods for a DBObject
|
||||
type DBObject interface {
|
||||
GenerateID()
|
||||
IsNotInCatalog()
|
||||
SetID(id string)
|
||||
GetID() string
|
||||
GetName() string
|
||||
|
||||
Reference in New Issue
Block a user