Giter Site home page Giter Site logo

edgio-go-sdk's Introduction

Edgio Go SDK

This project goal is to implement a GO SDK wrapper for the Edgio's REST API. This SDK is a starting point for more advanced projects like a CLI and a Terraform Provider.

Project Standards

License GitHub go.mod Go version semantic-release conventional-commits Static Badge

Project Meta Data

gh-tag GitHub Downloads Repo's Stars All Contributors GH Issues GitHub Sponsors

Project Status

GitHub milestone details GitHub milestone details Quality Gate Status Coverage Bugs Code Smells Duplicated Lines (%) Reliability Rating Security Rating Technical Debt Maintainability Rating Vulnerabilities

Table of Contents

Internal Packages

The internal package documentation is intended to potential contributors of the repository, since they are not exposed to be directly imported. If you are a user, you shoud use our public api-specific packages to develop your application.

internal/client

This package provides a base client configuration and connection to Edgio's REST API, as well as configuration validation. The public packages under edgio namespace uses this client under the hood to perform their API calls.

client.New(creds common.Creds, config common.ClientConfig) (client.Client, error)

This constructor validates and assing default valued (if applicable) to the provided credentials and configurations and returns a client instance with a valid access token, or an error if anything goes wrong.

utils.GetServiceURL(params common.URLParams) string

This function generates the fully formatted Edgio REST API's url for the desired resource, identified by its service, scope and apiVersion.

Check a more in-depth documentation of thw internal/client package here.

back to top

internal/token

The main goal of this package is to hold any logic related to the aquisition/refreshing/invalidation generated by Edgio REST API client.

token.GetAccessToken(credentials common.Creds) (string, error)

This func outsources the process of getting an auth token from Edgio's Auth service. It assumes Edgio's standard auth endpoint as a default URL, but that can be overwritten by your own, in the event of an enterprise/self-hosted app.

Check a more in-depth documentation of the internal/token package here.

back to top

internal/utils

This package package holds some utility functions that are used to outsource some common logic from other packages to avoid repetition/ease testing.

utils.GetHttpJsonResult(httpClient *http.Client, request *http.Request, token string, model interface{}) (interface{}, error)

This function has mainly three related goals:

  1. Process http requests;
  2. treat HTTP errors in a standardized way, and;
  3. Process and decode returned json data from the endpoints.

utils.FilterList[T common.Filterable](params common.FilterListParams[T]) []T

Filters the list of items (haystack) by the given needle. Returns a list of items that contain the needle in their name, key or slug, depending on the entity type (Property, Environment, Variable), or an empty list if no items match the needle.

Check a more in-depth documentation of the internal/utils package here.

back to top

Public Packages

The public packages are the parts of the SDK that are actually intended to be used. You should be able to import just those you need for your project.

edgio/common

This package expose public interfaces, structs and other functions that could not be hosted on the internal packages, since in some cases they are required by both other internal packages and some public ones, leading to cyclic imports. Due to that, they were outsourced to their own package.

common.ClientConfig.Merge(other common.ClientConfig{})

Merges the other ClientConfig into the default one, overwriting the current values with the other's if they are not empty.

Check a more in-depth documentation of the edgio/common package here.

back to top

edgio/org

[WIP]

This package groups Edgio Organization specific funcs.

org.NewClient(params ClientParams) (ClientStruct, error)

This func returns a new client with the provided parameters, with an access token already set, and the default edgio params values for service, scope and API version (which can be overwritten if needed) to interact with your application's orgs.

org.Get(params common.URLParams) (getResultType, error)

This func returns the relevant organization details (name and id).

Check a more in-depth documentation of the edgio/org package here.

Reference: Edgio Organizations REST API documentation reference.

back to top

edgio/property

[WIP]

This package groups Edgio Property specific funcs.

property.NewClient(params ClientParams) (ClientStruct, error)

This func returns a new client with the provided parameters, with an access token already set, and the default edgio params values for service, scope and API version (which can be overwritten if needed) to interact with your application's properties.

property.List() (ListResultType, error)

This func lists properties for a given Edgio Organization. Edgio's list page size was defaulted to 100 for now, which is the highest value. The idea is to return all properties until actual pagination is implemented. Returns a list of properties for a given Organization or an error if anything goes wrong.

property.FilterList(params property.FilterParams) (common.FilteredListResultType[common.Property], error)

Filters the list of properties for a given Org by the property slug, and returns a list of properties that contain the provided slug, or all properties if no slug is provided.

property.Get(params property.FilterParams) (common.Property, error)

This func retrieves a property by ID and returns it, or empty if none was found.

GetBySlug(params FilterParams) (common.Property, error)

Returns the first property in the list that matches the slug, or nil if no properties match the slug.

Check a more in-depth documentation of the edgio/property package here.

Reference: Edgio Properties REST API documentation reference.

back to top

edgio/env

[WIP]

This package groups Edgio Environment specific funcs.

env.NewClient(params common.ClientParams) (ClientStruct, error)

This func returns a new client with the provided parameters, with an access token already set, and the default edgio params values for service, scope and API version (which can be overwritten if needed) to interact with your application's environments.

env.List(propertyID string) (ListResultType, error)

This func list environments for a given Edgio Property. Edgio's list page size was defaulted to 100 for now, which is the highest value. The idea is to return all environments until actual pagination is implemented. Returns a list of environments for a given Property or an error if anything goes wrong.

env.FilterList(params env.FilterParams) (common.FilteredListResultType[common.Env], error)

Filters the list of environments for a given Property by the environment name, and returns a list of environments for a given Property that contain the provided name, or all environments if no name is provided.

env.Get(params env.FilterParams) (common.Env, error)

This func retrieves an environment by ID and returns it, or empty if none was found.

env.GetByName(params FilterParams) (common.Env, error)

Returns the first environment in the list that matches the name, or nil if no environments match the name.

Check a more in-depth documentation of the edgio/env package here.

Reference: Edgio Environments REST API documentation reference.

back to top

edgio/variables

[WIP]

This package groups Edgio Environment Variables specific funcs.

variable.NewClient(params common.ClientParams) (ClientStruct, error)

This func returns a new client with the provided parameters, with an access token already set, and the default edgio params values for service, scope and API version (which can be overwritten if needed) to interact with your application's environments.

variable.List(environmentID string) (ListResultType, error)

This func list environment variables for a given Edgio Environment. Edgio's list page size was defaulted to 100 for now, which is the highest value. The idea is to return all environment variables until actual pagination is implemented. Returns a list of environment variables for a given Property or an error if anything goes wrong.

variable.FilterList(params variable.FilterParams) (common.FilteredListResultType[common.Variable], error)

This func filters the list of environment variables for a given Environment by the variable key, and returns a list of environment variables that contain the provided key, or all environment variables if no key is provided.

variable.Get(params variable.FilterParams) (common.Variable, error)

This func retrieves an environment variable by ID and returns it, or empty if none was found.

GetByKey(params FilterParams) (common.Variable, error)

This func returns the environment variable that matches the provided key, or nil if no environment variables match the key.

Check a more in-depth documentation of the edgio/variables package here.

Reference: Edgio Environment Variables REST API documentation reference.

back to top

edgio/cache

[WIP]

Edgio Cache REST API documentation reference.

back to top

edgio/cdn

[WIP]

Edgio CDN REST API documentation reference.

back to top

edgio/deployment

[WIP]

Edgio Deployment REST API documentation reference.

back to top

edgio/tsl

[WIP]

Edgio TSL REST API documentation reference.

back to top

edgio/acl

[WIP]

Edgio ACL REST API documentation reference.

back to top

edgio/security_ruleset

[WIP]

Edgio Security Ruleset REST API documentation reference.

back to top

edgio/schemas

[WIP]

Edgio Schemas REST API documentation reference.

back to top

edgio/rate

[WIP]

Edgio Rate Rules REST API documentation reference.

back to top

edgio/bot_manager

[WIP]

Edgio Managers Config REST API documentation reference.

back to top

edgio/bot_ruleset

[WIP]

Edgio Bot Ruleset REST API documentation reference.

back to top

edgio/bot_known

[WIP]

Edgio Known Bots REST API documentation reference.

back to top

edgio/custom_rule

[WIP]

Edgio Custom Rules REST API documentation reference.

back to top

edgio/managed_rule

[WIP]

Edgio Managed Rules REST API documentation reference.

back to top

edgio/ruleset

[WIP]

Edgio Edgio Rulesets REST API documentation reference.

back to top

edgio/security_app

[WIP]

Edgio Security Apps REST API documentation reference.

back to top

Tooling

There are a few tools we provide alongside with the source code to ease a little bit the burden of following a bunch of patterns and standards we set up, as well as automate some boring processes.

  • comitizen: This CLI helps with writting commit messages in a meaningful and standardized way, so that our automation process can use them to properly write our software, changelog. To use it, you just need to run ./tools/commitizen-go install from the repository's root folder. After that, you just need to use git cz command instead of the standard git commit and follow the cli interactive steps :)

Contributors

Kudos to all our dear contributors. Without them, nothing would have been possible โค๏ธ

Rafael Eduardo Paulin
Rafael Eduardo Paulin

๐Ÿ’ป ๐ŸŽจ ๐Ÿ“– ๐Ÿค” ๐Ÿš‡ ๐Ÿšง ๐Ÿ“† ๐Ÿ‘€ โš ๏ธ ๐Ÿ”ง โœ…
Rafael A
Rafael A

๐Ÿ‘€

Would you like to see your profile here? Take a look on our Code of Conduct and our Contributing docs, and start coding! We would be thrilled to review a PR of yours! ๐Ÿ’ฏ

back to top

Changelog

All changes made to this module since the start of development can be found either on our release list or on the changelog.

back to top

Roadmap

Any planned enhancement to the module will be described and tracked in our project page

back to top

edgio-go-sdk's People

Contributors

rafapaulin avatar semantic-release-bot avatar allcontributors[bot] avatar

Stargazers

 avatar  avatar Howie Ross avatar Cesar Kohl avatar Lobs avatar Maurรญcio Carnieletto avatar Daniel Alves avatar Rafael A avatar

Watchers

Rafael A avatar  avatar

Forkers

tristanlee85

edgio-go-sdk's Issues

[FEATURE]: Split project into multiple go-modules for independent usage

Description

The goal is to mimic the same pattern as other projects have been doing, modularizing the sdk as much as possible, where each folder on the root level represents a module, so the end user don't get bloated with a bunch of dependencies they didn't want and didn't need indeed.

For this we are planning to have this repository working like a monorepo, where by design each of these contents have their own modularization and usage. if for some reason on the future, one of these does not make sense we can easily teardown or halt the work if needed.

we need to have these decisions well documented for future reference and to help onboard other peoples.

Proposed Solution

As a developer, I want to be able to use independent packages, so I can use parts of the sdk on demand, without overloading the end product with useless dependencies.

Alternatives / Workarounds

No response

Acceptance Criteria

  • each module should be usable independently in a use-land project
  • shared code like client should preserved throughout the modules.
  • write tests to ensure modularity as a real functionality including shared clients

Additional Context

it is important to define what is the expected behaviour when the user uses more than one module to compose his solution, should the client being persistent throughout the modules? should each of them being separately in their functionality?
should we have the client behaving as a singleton just when it identifies environment variables on the system?

References

Code of Conduct

  • I agree to follow this project's Code of Conduct

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

[FEATURE]: [Organization] Delete

Description

Access to Edgio's organization is the starting point of their REST API. This endpoint deletes an organization identified by its id.

Proposed Solution

As a developer, I want to remove an organization from my Edgio's account.

Acceptance Criteria

  • Implement DELETE Organization Edgio's REST API endpoint
  • Function remove the Org from Edgio's account and return updated org's data in JSON format
  • Unit test the new functionality
  • Document functionality's usage

Additional Context

Conventional Commit Context: org

References

Code of Conduct

  • I agree to follow this project's Code of Conduct

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

[FEATURE]: [Organization] Get

Description

Access to Edgio's organization is the starting point of their REST API. This endpoint retrieves information about an organization identified by its id.

Proposed Solution

As a developer, I want retrieve Edgio's org info, so that I can use retrieved data do perform other operations.

Acceptance Criteria

  • Implement GET Organization Edgio's REST API endpoint
  • Function should return Org's data in JSON format
  • Unit test the new functionality
  • Document functionality's usage

Additional Context

Conventional Commit Context: org

References

Code of Conduct

  • I agree to follow this project's Code of Conduct

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

[FEATURE]: [Env Var] Set

Description

Environment Variables play a fundamental role on Edgio's ecosystem. Without them, there is a high change properties do not work correctly.

Set Environment Variable allow both creating and updating an Env Var. Implementing the create/update endpoint is a fundamental part of any CRUD.

Being able to set given env var, allowing eventual error fixes when needed, is an important part of the SDK.

Proposed Solution

As a developer, I want to create and update Edgio's environment variable, so that I can properly configure my environments by either adding env vars, or updating their values to fix eventual errors.

Alternatives / Workarounds

No response

Acceptance Criteria

  • Implement PUT Environment Variable Edgio's REST API endpoint
  • Function should return Environment Variable's data in JSON format
  • Unit test the new functionality
  • Document functionality's usage

Additional Context

Conventional Commit Context: env-var

References

Code of Conduct

  • I agree to follow this project's Code of Conduct

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

[Deploy Info] Get Logs

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

[Cache] Purge

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

[FEATURE]: [Property] Create

Description

Implementing the create endpoint is a fundamental part of any CRUD. Since most of Edgio's REST API operations rely on a property, being able to create one dynamically when needed will a key part of any automated routine of this SDK

Proposed Solution

As a developer, I want to be able to dynamically create an Edgio property through the SDK, so that I can automate some routines.

Alternatives / Workarounds

No response

Acceptance Criteria

  • Implement POST Property Edgio's REST API endpoint
  • Function should return Property's data in JSON format
  • Unit test the new functionality
  • Document functionality's usage

Additional Context

Conventional Commit Context: property

References

Code of Conduct

  • I agree to follow this project's Code of Conduct

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

[FEATURE]: [Env Var] Set List

Description

Sometimes a batch of environment variables need to be created to properly configure an environment. Calling a method in a loop may be problematic on some contexts, specially when a method can handle a list of variables to set internally.

Proposed Solution

As a developer, I want to just provide a list of key -> value pairs of environment variables to a method, and have it process the whole list and create the variables, so that it simplifies the automation process

Alternatives / Workarounds

No response

Acceptance Criteria

  • Implement a function that takes a list of structs, that has key: string, value: string and secret: boolean values.
  • The implemented function must make use of the previously implemented set env var method to create/update each variable on the list
  • Unit test the new functionality
  • Document functionality's usage

Additional Context

Conventional Commit Context: env-var

References

Code of Conduct

  • I agree to follow this project's Code of Conduct

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

[CDN Config] Deploy

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

[Deploy Info] Get Deployment

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

[FEATURE]: [Env Var] Get All (List)

Description

Environment Variables play a fundamental role on Edgio's ecosystem. Without them, there is a high change properties do not work correctly. Being able to get an env var list, allowing eventual validations/modifications when needed in batches, is an important part of the SDK.

Proposed Solution

As a developer, I want to fetch an Edgio Env Var list, so that I can perform batch operations on multiple env vars.

Alternatives / Workarounds

No response

Acceptance Criteria

  • Implement GET Environment Variable List Edgio's REST API endpoint
  • Function should return Environment Variable List's data in JSON format
  • Unit test the new functionality
  • Document functionality's usage

Additional Context

Conventional Commit Context: env-var

References

Code of Conduct

  • I agree to follow this project's Code of Conduct

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

[Cache] Get

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

[REFACTOR]: Change `GetHTTPJSONResult` function to return data

Description

Currently, GetHTTPJSONResult modifies a var reference to "return" the data retrieved from the HTTP call. This behavior is not ideal, and may lead to poor maintenance/unexpected behavior in the future. Not to mention that it kills the idiomatic go concept.

Proposed Solution

As a developer, I want to be able to use the GetHTTPJSONResult util in a more predictable/idiomatic way, so that it is more clear/maintainable to use it throughout the other packages

Alternatives / Workarounds

The util is currently working, but it is a bad practice. It could be kept as is, but it is not ideal.

Acceptance Criteria

  • GetHTTPJSONResult Returns JSON data, or an error
  • JSON data returned must be assignable to struct-typed variables
  • GO strong type must work
  • Returned data must be manipulable
  • All packages that make use of the util must be refactored to accommodate the changes
  • Adjust the docs to reflect changes

Additional Context

N/A

References

N/A

Code of Conduct

  • I agree to follow this project's Code of Conduct

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

[FEATURE]: [Property] Delete

Description

Sometimes a property may not be necessary anymore. Keeping a clean ecosystem is key for any good developer experience.

Proposed Solution

As a developer, I want to be able to dynamically delete an Edgio property through the SDK, so that I can keep the ecosystem always clean and tidy.

Alternatives / Workarounds

No response

Acceptance Criteria

  • Implement DELETE Property Edgio's REST API endpoint
  • Function should return Property's data in JSON format
  • Unit test the new functionality
  • Document functionality's usage

Additional Context

Conventional Commit Context: property

References

Code of Conduct

  • I agree to follow this project's Code of Conduct

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

[FEATURE]: [Env Var] GetById

Description

Environment Variables play a fundamental role on Edgio's ecosystem. Without them, there is a high change properties do not work correctly. Being able to get a given env var, allowing eventual validations/modifications when needed, is an important part of the SDK.

Proposed Solution

As a developer, I want to fetch an Edgio environment variable by its ID, so that I can perform other operations that depends on an environment variable.

Alternatives / Workarounds

No response

Acceptance Criteria

  • Implement GET Environment Variable Edgio's REST API endpoint
  • Function should return Environment Variable's data in JSON format
  • Unit test the new functionality
  • Document functionality's usage

Additional Context

Conventional Commit Context: env-var

References

Code of Conduct

  • I agree to follow this project's Code of Conduct

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

[FEATURE]: [Environment] GetById

Description

Environments are the "third layer" (under Org > Property) of Edgio's ecosystem. Starting with a GET operation for the environments.

Proposed Solution

As a developer, I want to fetch an Edgio environment by its ID, so that I can perform other operations that depends on an environment.

Alternatives / Workarounds

No response

Acceptance Criteria

  • Implement GET Environment Edgio's REST API endpoint
  • Function should return Environment's data in JSON format
  • Unit test the new functionality
  • Document functionality's usage

Additional Context

Conventional Commit Context: env

References

Code of Conduct

  • I agree to follow this project's Code of Conduct

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

[CDN Config] Get

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

[FEATURE]: [Env Var] Unset List

Description

Sometimes an environment variable may not be necessary anymore. Sometimes many. Keeping a clean ecosystem is key for any good developer experience.

Proposed Solution

As a developer, I want to just provide a list of environment variables' keys to a method, and have it process the whole list and remove all of them, so that it simplifies the automation process

Alternatives / Workarounds

No response

Acceptance Criteria

  • Implement a function that takes a list of strings (env var keys).
  • The implemented function must make use of the previously implemented unset env var method to unset each variable on the list
  • Unit test the new functionality
  • Document functionality's usage

Additional Context

Conventional Commit Context: env-var

References

Code of Conduct

  • I agree to follow this project's Code of Conduct

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

[FEATURE]: [Environment] Create

Description

Implementing the create endpoint is a fundamental part of any CRUD. Since many of Edgio's REST API operations depends on environments, being able to create one dynamically when needed will a key part of any automated routine of this SDK.

Proposed Solution

As a developer, I want to be able to dynamically create an Edgio environment through the SDK, so that I can automate some routines.

Alternatives / Workarounds

No response

Acceptance Criteria

  • Implement POST Environment Edgio's REST API endpoint
  • Function should return Environment's data in JSON format
  • Unit test the new functionality
  • Document functionality's usage

Additional Context

Conventional Commit Context: env

References

Code of Conduct

  • I agree to follow this project's Code of Conduct

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

[FEATURE]: [Environment] Delete

Description

Sometimes an environment may not be necessary anymore. Keeping a clean ecosystem is key for any good developer experience.

Proposed Solution

As a developer, I want to be able to dynamically delete an Edgio environment through the SDK, so that I can keep the ecosystem always clean and tidy.

Alternatives / Workarounds

No response

Acceptance Criteria

  • Implement DELETE Environment Edgio's REST API endpoint
  • Function should return Environment's data in JSON format
  • Unit test the new functionality
  • Document functionality's usage

Additional Context

Conventional Commit Context: env

References

Code of Conduct

  • I agree to follow this project's Code of Conduct

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

[FEATURE]: Set up semantic-release

Description

Versioning is an important part of development. Even better if it is done automatically.

Proposed Solution

As a developer, I want my new features/bugfixes to be released automatically through GHA when my PR is approved and merged bumping the current version, so that other devs may benefit from it while still support previous implementations (previous versions).

Alternatives / Workarounds

Git-tagging and creating releases manually. That is no practical solution and was promptly discarded.

Acceptance Criteria

  • Implement and configure Semantic Release
  • Enforce conventional commits so that the messages can be used automatically on changelogs
  • Semantic release should auto generate changelogs
  • Project should be released automatically through GHA
  • Git tag should be automatically created (and bumped) when a new merge happens on main branch

Additional Context

Conventional commit details

Allowed commit types

  • Patch version bump (0.0.x)
    • fix (bugfixes)
    • perf (performance upgrades)
    • revert (commit revert)
  • Minor version bump (0.x.0)
    • feat (new features)
  • Major version bump (x.0.0)
    • feat (new features with breaking changes)
  • No version bump
    • docs (documentation updates)
    • chore (general changes not related to functionalities)
    • ref (general refactor that does not affect functionalities)
    • test (test implementation)
    • wip (work in progress)
    • style (Changes that do not affect any functionality, like white-space, formatting, missing semi-colons, etc)

Allowed commit scopes

References

Code of Conduct

  • I agree to follow this project's Code of Conduct

[FEATURE]: [Organization] Patch

Description

Access to Edgio's organization is the starting point of their REST API. This endpoint updates information about an organization identified by its id.

Proposed Solution

As a developer, I want to update Edgio's org info, so that its data is always up to date.

Acceptance Criteria

  • Implement PATCH Organization Edgio's REST API endpoint
  • Function should update Org's name and return updated org's data in JSON format
  • Unit test the new functionality
  • Document functionality's usage

Additional Context

Conventional Commit Context: org

References

Code of Conduct

  • I agree to follow this project's Code of Conduct

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

[FEATURE]: [Environment] Get All (List)

Description

Environments are the "third layer" (under Org > Property) of Edgio's ecosystem. Many of the other domains' endpoints rely on environments. This issue is about implementing the endpoint to get a Property's environment list.

Proposed Solution

As a developer, I want to fetch an Edgio environment list, so that I can perform batch operations that depends on an environments.

Alternatives / Workarounds

No response

Acceptance Criteria

  • Implement GET Environment List Edgio's REST API endpoint
  • Function should return Environment List's data in JSON format
  • Unit test the new functionality
  • Document functionality's usage

Additional Context

Conventional Commit Context: env

References

Code of Conduct

  • I agree to follow this project's Code of Conduct

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

[FEATURE]: [Property] GetById

Description

Properties are the base of Edgio's infrastructure. Most of the other domains' endpoints rely on a given property ID to be usable. This issue is about implementing the endpoint to get a property by its ID.

Proposed Solution

As a developer, I want to fetch an Edgio property by its ID, so that I can perform other operations that rely on a property.

Alternatives / Workarounds

No response

Acceptance Criteria

  • Implement GET Property Edgio's REST API endpoint
  • Function should return Property's data in JSON format
  • Unit test the new functionality
  • Document functionality's usage

Additional Context

Conventional Commit Context: property

References

Code of Conduct

  • I agree to follow this project's Code of Conduct

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

[FEATURE]: [Property] Get All (List)

Description

Properties are the base of Edgio's infrastructure. Most of the other domains' endpoints rely on a given property ID to be usable. This issue is about implementing the endpoint to get an Org's property list.

Proposed Solution

As a developer, I want to fetch an Edgio Org's property list, so that I can perform batch operations on multiple properties.

Alternatives / Workarounds

No response

Acceptance Criteria

  • Implement GET Properties List Edgio's REST API endpoint
  • Function should return Property List's data in JSON format
  • Unit test the new functionality
  • Document functionality's usage

Additional Context

Conventional Commit Context: property

References

Code of Conduct

  • I agree to follow this project's Code of Conduct

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

[FEATURE] GetBy<Key|Name|Slug>

Description

Edgio's REST API does not support get by on its get methods, and sometimes the necessary ID may not be available to perform a GET method by entity's ID. Getting the entity by a human readable parameter may prove useful.

Proposed Solution

As a developer, I want to be able to get an entity by its name/slug/key, so that I can perform my operations based on data other than Edgio entity's IDs

Alternatives / Workarounds

Perform a full scope set of GET calls (potentially Org > Property > Environment > Environment Variable), and filter each manually.

Acceptance Criteria

  • Implement a function that gets a complete list of a given entity, and filter through it based on entity's name/slug/key, for each entity
  • Match between needle and haystack should be an exact match
  • The function should return only one entity if an entity is found (first match)
  • The function should return nil if no entity was returned from the filter
  • Properties should be filtered by slug key
  • Environment should be filtered by name key
  • Environment Variables should be filtered by key key
  • The function should return the entity's data in a JSON format
  • Unit test the new functionality
  • Document functionality's usage

Additional Context

N/A

References

N/A

Code of Conduct

  • I agree to follow this project's Code of Conduct

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

[FEATURE]: [Auth] Edgio REST API Centralized Authentication

Description

Having a centralized auth function that generates and set a global module variable with the access token allow a single-auth strategy for the SDK, allowing the user to use any other function on the SDK without needing to worry of authenticating a second time, or pass a context around to perform multiple operations withing Edgio's REST API.

Proposed Solution

As a developer, I want to be able to be able to authenticate to Edgio's REST API with my API Client's credentials and generate my access token to be able to use all packages available on 42dx/edgio-go-sdk.

Acceptance Criteria

  • Edgio's REST API Auth function implementing and working
  • Edgio's REST API Access token being generated and saved to a package's variable to be used by other functions
  • Implement app.cache+app.cache.purge+app.waf+app.waf:edit+app.waf:read+app.accounts+app.config (all scopes) as default scope value
  • Implement https://id.edgio.app/connect/token as default auth URL
  • Unit test the implemented functions
  • Document the usage

References

Code of Conduct

  • I agree to follow this project's Code of Conduct

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

[FEATURE]: [Environment] Update

Description

Updating an environment is an important part of the SDK, since environment are an important of the Edgio's ecosystem.

Proposed Solution

As a developer, I want to be able to dynamically update a given Edgio environment through the SDK, so that I can fix any eventual configuration error on the fly.

Alternatives / Workarounds

No response

Acceptance Criteria

  • Implement PATCH Environment Edgio's REST API endpoint
  • Function should return Environment's data in JSON format
  • Unit test the new functionality
  • Document functionality's usage

Additional Context

Conventional Commit Context: env

References

Code of Conduct

  • I agree to follow this project's Code of Conduct

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

[FEATURE]: [Property] Update

Description

Updating a property is an important part of the SDK, since properties are the base of the Edgio's ecosystem.

Proposed Solution

As a developer, I want to be able to dynamically update a given Edgio property through the SDK, so that I can fix any eventual configuration error on the fly.

Alternatives / Workarounds

No response

Acceptance Criteria

  • Implement PATCH Property Edgio's REST API endpoint
  • Function should return Property's data in JSON format
  • Unit test the new functionality
  • Document functionality's usage

Additional Context

Conventional Commit Context: property

References

Code of Conduct

  • I agree to follow this project's Code of Conduct

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

[FEATURE]: [Env Var] Unset

Description

Sometimes an environment variable may not be necessary anymore. Keeping a clean ecosystem is key for any good developer experience.

Proposed Solution

As a developer, I want to be able to dynamically delete an Edgio environment variable through the SDK, so that I can keep the ecosystem always clean and tidy.

Alternatives / Workarounds

No response

Acceptance Criteria

  • Implement DELETE Environment Variable Edgio's REST API endpoint
  • Function should return Environment Variable's data in JSON format
  • Unit test the new functionality
  • Document functionality's usage

Additional Context

Conventional Commit Context: env-var

References

Code of Conduct

  • I agree to follow this project's Code of Conduct

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

[FEATURE]: Filter List

Description

Edgio's REST API does not support filtering on its entity list methods, and sometimes the necessary ID may not be available to perform a GET method by entity's ID. Getting the entity by a human readable parameter may prove useful.

Proposed Solution

As a developer, I want to be able to filter a list of entities by their name/slug/key, so that I can perform my operations based on data other than Edgio entity's IDs

Alternatives / Workarounds

Perform a full scope set of GET calls (potentially Org > Property > Environment > Environment Variable), and filter each manually.

Acceptance Criteria

  • Implement a function that gets a complete list of a given entity, and filter through it based on entity's name/slug
  • Properties should be filtered by slug key
  • Environment should be filtered by name key
  • Environment Variables should be filtered by key key
  • The function should return the entity's data in a JSON format
  • Unit test the new functionality
  • Document functionality's usage

Additional Context

N/A

References

N/A

Code of Conduct

  • I agree to follow this project's Code of Conduct

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.