View Source Mix.Flowy.Core (Flowy v0.1.4)

Generates a Flowy core module.

Summary

Functions

Builds a core module struct from a schema.

Builds a core module struct from a schema.

Check if the core module already exists.

Check if the core test module already exists.

Validates the core module name.

Types

@type t() :: %Mix.Flowy.Core{
  alias: atom(),
  base_module: atom(),
  context_app: atom(),
  dir: String.t(),
  file: String.t(),
  generate?: boolean(),
  module: atom(),
  opts: Keyword.t(),
  query: Mix.Flowy.Query.t(),
  schema: Mix.Flowy.Schema.t(),
  test_file: String.t(),
  web_module: atom()
}

Functions

@spec new(String.t(), Keyword.t()) :: t()

Builds a core module struct from a schema.

Link to this function

new(core_name, schema, opts)

View Source
@spec new(String.t(), t(), Keyword.t()) :: t()

Builds a core module struct from a schema.

@spec pre_existing?(t()) :: boolean()

Check if the core module already exists.

Link to this function

pre_existing_tests?(core)

View Source
@spec pre_existing_tests?(t()) :: boolean()

Check if the core test module already exists.

@spec valid?(String.t()) :: boolean()

Validates the core module name.