types

package
v0.0.0-...-e28bd7b Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

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

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) Override

func (c *Config) Override()

Override overrides certain config

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

Jump to

Keyboard shortcuts

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