Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultNatsClientID is a default NATS Client ID DefaultNatsClientID = "user-action-service" // DefaultMongoDBURL is a default MongoDB URL DefaultMongoDBURL = "mongodb://localhost:27017" // DefaultMongoDBName is a default MongoDB Name DefaultMongoDBName = "cacao-user-action" // DefaultUserActionMongoDBCollectionName is a default MongoDB Collection Name DefaultUserActionMongoDBCollectionName = "user_action" )
Variables ¶
This section is empty.
Functions ¶
func ConvertToModel ¶
func ConvertToModel(session cacao_common_service.Session, userAction UserAction) cacao_common_service.UserActionModel
ConvertToModel converts UserAction to UserActionModel
Types ¶
type Config ¶
type Config struct { // NATS NatsStanConfig messaging2.NatsStanMsgConfig // MongoDB MongoDBConfig cacao_common_db.MongoDBConfig UserActionMongoDBCollectionName string }
Config is the configuration settings, which can be used by the Domain object or Adapters
func (*Config) ProcessDefaults ¶
func (c *Config) ProcessDefaults()
ProcessDefaults will take a Config object and process the config object further, including populating any null values
type UserAction ¶
type UserAction struct { ID common.ID `bson:"_id" json:"id,omitempty"` Owner string `bson:"owner" json:"owner,omitempty"` Name string `bson:"name" json:"name,omitempty"` Description string `bson:"description" json:"description,omitempty"` Public bool `bson:"public" json:"public,omitempty"` Type cacao_common_service.UserActionType `bson:"type" json:"type,omitempty"` Action cacao_common_service.UserActionItem `bson:"action" json:"action,omitempty"` CreatedAt time.Time `bson:"created_at" json:"created_at,omitempty"` UpdatedAt time.Time `bson:"updated_at" json:"updated_at,omitempty"` }
UserAction is a struct for storing user action information
func ConvertFromModel ¶
func ConvertFromModel(model cacao_common_service.UserActionModel) UserAction
ConvertFromModel converts UserActionModel to UserAction
Click to show internal directories.
Click to hide internal directories.