Documentation ¶
Index ¶
- Constants
- Variables
- func CheckUnique(s string) bool
- func EncodeManifest(m *Manifest) ([]byte, error)
- func Index(m *Manifest)
- func IndexCommandMutation(c CommandMutation)
- func IndexEventMutation(c EventMutation)
- func NormalizePath(filePath string, m *Manifest) string
- func SanitizeManifest(m *Manifest)
- func SetDefaultGoModules(manifest *Manifest)
- func SetGoModules(manifest *Manifest, modules []string)
- func Validate(path string, m *Manifest) error
- func ValidateManifest(m *Manifest) error
- func Walk(path string, m *Manifest, fn func(File) error) error
- func WalkCommandMutationAddons(path string, m *Manifest, fn func(CommandMutation, File) error) error
- func WalkEventMutationAddons(path string, m *Manifest, fn func(EventMutation, File) error) error
- type Command
- type CommandMutation
- type Contributor
- type Event
- type EventMutation
- type File
- type Manifest
- type Mutations
Constants ¶
View Source
const ( HTTPCommandBus commandBusAdapter = iota GRPCCommandBus NATSCommandBus )
View Source
const ( HTTPCommandBusName = "http" GRPCCommandBusName = "grpc" NATSCommandBusName = "nats" )
View Source
const ( KafkaStreamPublisher publisherAdapter = iota ConnectorStreamPublisher )
View Source
const ( KafkaStreamPublisherName = "kafka" ConnectorStreamPublisherName = "wal" )
View Source
const ( DefaultStreamStorage storageAdapter = iota RedisStreamStorage PostgresStreamStorage )
View Source
const ( DefaultName = "mem" RedisStreamStorageName = "redis" PostgresStreamStorageName = "postgres" )
View Source
const ( // Events EventMutationAddon = "EventMutation" EventMutationTestAddon = "EventMutationTest" EventMutationImplAddon = "EventMutationImpl" EventControllerAddon = "EventController" EventStateAddon = "EventState" EventsEventsAddon = "EventsEventsAddon" EventsEventsEncodingAddon = "EventsEventsEncodingAddon" // Commands CommandMutationAddon = "CommandMutation" CommandMutationImplAddon = "CommandMutationImpl" CommandMutationTestAddon = "CommandMutationTest" CommandControllerAddon = "CommandController" CommandStateAddon = "CommandState" CommandsAddon = "Commands" CommandsEncodingAddon = "CommandsEncoding" CommandsEventsAddon = "CommandEvents" CommandsEventsEncodingAddon = "CommandEventsEncoding" // Projection ProjectionTestAddon = "ProjectionTest" CommandMutationProjectionAddon = "CommandMutationProjection" CommandMutationImplProjectionAddon = "CommandMutationImplProjection" CommandControllerProjectionAddon = "CommandControllerProjection" EventMutationProjectionAddon = "EventMutationProjection" EventMutationImplProjectionAddon = "EventMutationImplProjection" EventControllerProjectionAddon = "EventControllerProjection" )
View Source
const ( YesOp = "yes" NoOp = "no" )
Variables ¶
View Source
var CommandBusAdapters = map[commandBusAdapter]string{ NATSCommandBus: NATSCommandBus.String(), GRPCCommandBus: GRPCCommandBus.String(), HTTPCommandBus: HTTPCommandBus.String(), }
View Source
var PublisherAdapters = map[publisherAdapter]string{ KafkaStreamPublisher: KafkaStreamPublisher.String(), ConnectorStreamPublisher: ConnectorStreamPublisher.String(), }
View Source
var StorageAdapters = map[storageAdapter]string{ DefaultStreamStorage: DefaultStreamStorage.String(), RedisStreamStorage: RedisStreamStorage.String(), PostgresStreamStorage: PostgresStreamStorage.String(), }
Functions ¶
func CheckUnique ¶
func EncodeManifest ¶
func IndexCommandMutation ¶
func IndexCommandMutation(c CommandMutation)
func IndexEventMutation ¶
func IndexEventMutation(c EventMutation)
func NormalizePath ¶
func SanitizeManifest ¶
func SanitizeManifest(m *Manifest)
func SetDefaultGoModules ¶
func SetDefaultGoModules(manifest *Manifest)
func SetGoModules ¶
func ValidateManifest ¶
func WalkEventMutationAddons ¶
Types ¶
type CommandMutation ¶
type CommandMutation struct { Mutation string `yaml:"mutation"` Command Command `yaml:"in_command"` Event Event `yaml:"out_event"` Create string `yaml:"allow_create_stream,omitempty"` Delete string `yaml:"allow_delete_stream,omitempty"` }
func (CommandMutation) ControllerName ¶
func (c CommandMutation) ControllerName() string
type Contributor ¶
type Event ¶
func (Event) LcFirstName ¶
type EventMutation ¶
type EventMutation struct { Mutation string `yaml:"mutation"` InEvent Event `yaml:"in_event"` OutEvent Event `yaml:"out_event"` Create string `yaml:"allow_create_stream,omitempty"` Delete string `yaml:"allow_delete_stream,omitempty"` }
func (EventMutation) ControllerName ¶
func (c EventMutation) ControllerName() string
type File ¶
type Manifest ¶
type Manifest struct { Name string `yaml:"name"` PackageName string `yaml:"go_package_name"` StreamName string `yaml:"go_stream_name"` GoModules string `yaml:"go_modules"` GoVersion string `yaml:"go_version"` GoGetPackages []string `yaml:"go_get_packages"` EventsPkgName string `yaml:"go_events_pkg_name"` CommandsPkgName string `yaml:"go_commands_pkg_name"` StreamPkgName string `yaml:"go_stream_pkg_name"` Description string `yaml:"description"` Mutations Mutations `yaml:"mutations"` ImportEvents []string `yaml:"import_events"` StreamStorage streamStorage `yaml:"storage_adapter"` StreamPublisher publisher `yaml:"publisher_adapter"` CommandBus commandBus `yaml:"commandbus_adapter"` Contributors []Contributor `yaml:"contributors"` CreatedAt time.Time `yaml:"created_at"` UpdatedAt time.Time `yaml:"updated_at"` }
func DecodeManifest ¶
func (*Manifest) SetCommandBusFromString ¶
func (*Manifest) SetPublisherFromString ¶
func (*Manifest) SetStreamStorageFromString ¶
type Mutations ¶
type Mutations struct { Commands []CommandMutation `yaml:"from_commands"` Events []EventMutation `yaml:"from_events"` }
func (Mutations) HasCommands ¶
Click to show internal directories.
Click to hide internal directories.