go run cmd/cli/main.go entitlement create -o 01J1B21PZ27GM940P1ATE62RMM -p01J1B1V9MC3S9360569WHSSJ9Z
ID PLANID PLANNAME ORGANIZATIONID ORGANIZATIONNAME EXPIRESAT EXPIRES CANCELLED
01J1B277FG5GWZ6R29NE3VN179 01J1B1V9MC3S9360569WHSSJ9Z starter 01J1B21PZ27GM940P1ATE62RMM funkytown2 <nil> false false
Other Changes
adds consistency across all cli cmds, all files are renamed to get, update, create,delete, androot.rootnow contains all the logic for the object to print via JSON or Table output in one place, usescobra.CheckErracross all error checks in the CLI to have consistent errorexit 1` on failures.
All cmds now have Table output (default) in addition to JSON output)
Indexes, Hooks, and Interceptors are added to the ent schema template (internal/ent/base/entinit.tmpl)
Entitlement Hook - sets expires if expiresAt is not nil
Feature and Plan Hooks - Sets display name on creation if not provided based on the name
Generated resolvers, queries, and CLI commands for all the new schemas
Breaking Change
Some of the
query
names were changed in the client in order to have consistency across all functions:Get<Object>ByID
: filters by IDGetAll<Object>s
: no filter, get all the user has access toGet<Object>s
: includes an optionalwhere
filterNew/Updated Schemas
Create an Entitlement:
Other Changes
get
,update
, create,
delete, and
root.
rootnow contains all the logic for the object to print via JSON or Table output in one place, uses
cobra.CheckErracross all error checks in the CLI to have consistent error
exit 1` on failures.expires
ifexpiresAt
is not nil