An overview of Services

Services are the main unit of organization in the AssemblyLift framework. Primarily, they serve as a logical grouping of related functions.

Make a New Service

You can create a new service in an existing AssemblyLift application via the make command:

$ asml make service myservice

This will create a directory under services/ named myservice containing a default service.toml manifest.

In order for a service to be recognized by cast, it must be listed in the application manifest assemblylift.toml.

name = "my-amazing-project"

default = { name = "myservice" }

The Service Manifest

Each service is defined by its manifest, service.toml.

# Each service must have a service table
name = "service-name" # A name is required

# The API table contains functions and authorizers
name = "function-name" # A name is required

auth_type = "type"

# The IOmod table defines service dependencies
version = "x.x.x"
coordinates = ""

The service manifest defines the service's API, as well as an IOmods we wish to use in our service's functions. Each section of the service manifest is described in greater detail in the following sections.

Last updated