lua-resty-azure Development and Contribution Guide

Adding a new SDK Implementation

Each API/SDK implementation and endpoint capability is added manually into this library, due to its emphasis on performance and memory management.

To implement a new interface, you must create the new service module under resty/azure/api ensuring that it implements at least the :new method that also receives and stores the parent_client:

local new_svc_implementation = {}
new_svc_implementation.__index = new_svc_implementation

function new_svc_implementation:new(parent_client, custom_arg_1, custom_arg_2)
  local self = {}  -- override 'self' to be the new object/class
  setmetatable(self, new_svc_implementation)

  self.parent_client = parent_client

  -- do any further initialisation with the "custom args" here

  return self
end

Finally, you must also add it to the rockspec under the modules section. It should immediately be available for the calling client to use, and discovered automatically at Resty VM startup time.

Releases

Ensure the main branch is up to date for the release, and the documentation has been updated by re-rendering it using ldoc.

Make sure the working head is clean, then run the make target with the right environment setup:

git config user.name "Developer Name in GitHub"
git config user.email "Developer-Email-Address-in-GitHub@domain.local"
git config user.signingkey pgp-key-long-format-id   # optional PGP signing key

export LUAROCKS_TOKEN=<token>
make release RELEASE_TYPE=[major/minor/patch]

Afterwards, please remember to push the working head to origin:

git push --tags origin main
generated by LDoc 1.5.0 Last updated 2024-03-29 13:25:29