Giter VIP home page Giter VIP logo

location-api's Introduction

Location API

Provides GraphQL APIs to manage locations

Development and Contributing

Getting Started

To begin start by opening the devcontainer as outlined in the Development Guide

To initialize the database:

  1. go build
  2. ./location-api migrate up

To run the api

make go-run

Interacting with the GraphQL queries:

Go to localhost:XXXX/playground

Example GraphQL Queries

Create Location Mutation

Input:

mutation {
    locationCreate(input:{
        name: "DA",
        ownerID: "testtnt-123456",
        description: "DA Metro"
    }) {
        location{
            id
        }
    }
}

Output:

{
    "data": {
        "locationCreate": {
            "location": {
                "id": "lctnloc-NW_5CWPx3xeOuh4Ak2WgS"
            }
        }
    }
}

location-api's People

Contributors

renovate[bot] avatar tylerauerbeck avatar nicolerenee avatar rizzza avatar sfunkhouser avatar andy-v-h avatar cherchezlafemme avatar dependabot[bot] avatar sthwang-metal avatar

Watchers

Matt Anderson avatar

location-api's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • Update module github.com/spf13/cobra to v1.8.1
  • Update module github.com/wundergraph/graphql-go-tools to v1.67.4
  • Update module entgo.io/contrib to v0.6.0
  • Update module github.com/stretchr/testify to v1.9.0
  • Update module github.com/testcontainers/testcontainers-go/modules/postgres to v0.33.0
  • Update module go.infratographer.com/permissions-api to v0.5.1
  • Update module go.infratographer.com/x to v0.5.4
  • Update module go.uber.org/zap to v1.27.0
  • Update golangci/golangci-lint-action action to v6
  • Update goreleaser/goreleaser-action action to v6
  • Update module github.com/brianvoe/gofakeit/v6 to v7
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

devcontainer
.devcontainer/devcontainer.json
  • ghcr.io/devcontainers/features/docker-in-docker 2
docker-compose
.devcontainer/docker-compose.yml
dockerfile
.devcontainer/Dockerfile
  • mcr.microsoft.com/vscode/devcontainers/go 1-1.21-bullseye
Dockerfile
github-actions
.github/workflows/image-main-latest.yml
  • actions/checkout v4
  • actions/setup-go v4
  • docker/setup-qemu-action v3
  • goreleaser/goreleaser-action v5
.github/workflows/lint-go.yml
  • actions/checkout v4
  • actions/setup-go v4
  • golangci/golangci-lint-action v3
.github/workflows/release.yml
  • actions/checkout v4
  • actions/checkout v4
  • docker/setup-qemu-action v3
  • actions/setup-go v4
  • goreleaser/goreleaser-action v5
.github/workflows/test-go.yml
  • actions/checkout v4
  • actions/setup-go v4
gomod
go.mod
  • go 1.21
  • entgo.io/contrib v0.4.5
  • entgo.io/ent v0.12.4
  • github.com/99designs/gqlgen v0.17.38
  • github.com/Yamashou/gqlgenc v0.15.1
  • github.com/brianvoe/gofakeit/v6 v6.24.0
  • github.com/hashicorp/go-multierror v1.1.1
  • github.com/labstack/echo/v4 v4.11.3
  • github.com/lib/pq v1.10.9
  • github.com/mattn/go-sqlite3 v1.14.18
  • github.com/mitchellh/go-homedir v1.1.0
  • github.com/spf13/cobra v1.8.0
  • github.com/spf13/viper v1.17.0
  • github.com/stretchr/testify v1.8.4
  • github.com/testcontainers/testcontainers-go/modules/postgres v0.26.0
  • github.com/vektah/gqlparser/v2 v2.5.10
  • github.com/wundergraph/graphql-go-tools v1.67.0
  • go.infratographer.com/permissions-api v0.2.7
  • go.infratographer.com/x v0.3.9
  • go.uber.org/zap v1.26.0
helm-values
chart/location-api/values.yaml
helmv3
chart/location-api/Chart.yaml
  • common 2.13.3
  • reloader 1.0.52

  • Check this box to trigger a request for Renovate to run again on this repository

Add ability to run database migrations as part of helm chart

Is your feature request related to a problem? Please describe.
When deploying the location-api, database migrations need to be run manually. We should look at adding the ability to run the migration on init similar to how it is done in load-balancer-api

Describe the solution you'd like
Provide a helm value/flag that allows us to specify whether we would like to run migrations on init.

api:
  migrateOnInit: true

Describe alternatives you've considered
N/A

Additional context
N/A

Add event generation to location-api

Is your feature request related to a problem? Please describe.
Currently a majority of infratographer API's generate events that can be consumed by other downstream applications. This is currently missing from the location-api and we should look at adding this to bring this in line with the rest of the ecosystem.

Describe the solution you'd like
When an action is taken in the API, an appropriate event is generated

Describe alternatives you've considered
N/A

Additional context
N/A

Initial Location API

For the initial version of Location API we need to support creating locations that are scoped to a tenant.

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.