push

package
v0.0.0-...-7d3b672 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

README

Push API

Summary

This is a generic API service that gives our users the ability to inject data directly to their own database using a simple, all-purpose endpoint.

The Endpoint

POST to localhost:8080/push/:tableName

Where "tableName" is the name of the table you wish to insert into For example, "commits" would be /push/commits

The JSON body

Include a JSON body that consists of an array of objects you wish to insert. Please Note: You must know the schema you are inserting into (column names, types, etc.)

[
    {
        "id": "gitlab...etc",
        "sha": "osidjfoawehfwh08",
        "additions": 89,
        ...
    }
]

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Post

func Post(c *gin.Context)
POST /push/:tableName
[
	{
		"id": 1,
		"sha": "osidjfoawehfwh08"
	}
]

@Summary POST /push/:tableName @Description POST /push/:tableName @Tags framework/push @Accept application/json @Param tableName path string true "table name" @Param data body string true "data" @Success 200 {object} gin.H "{"rowsAffected": rowsAffected}" @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internal Error" @Router /push/{tableName} [post]

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL