Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbdias committed Jul 5, 2024
1 parent 78c3003 commit 704021d
Show file tree
Hide file tree
Showing 43 changed files with 3,631 additions and 270 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'
with:
distribution: goreleaser-pro
version: v1.23.0
version: v2.0.1
args: release --clean --split --nightly
env:
GOOS: ${{ matrix.GOOS }}
Expand Down Expand Up @@ -153,7 +153,7 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'
with:
distribution: goreleaser-pro
version: v1.23.0
version: v2.0.1
args: continue --merge
env:
VERSION: sha-${{ env.sha_short }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ jobs:
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser-pro
version: v1.23.0
version: v2.0.1
args: release --skip=announce --snapshot -f .goreleaser.dev.yaml

- name: Move binaries to known location
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-candidate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'
with:
distribution: goreleaser-pro
version: v1.23.0
version: v2.0.1
args: release --clean -f .goreleaser.rc.yaml
env:
VERSION: ${{ github.ref_name}}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'
with:
distribution: goreleaser-pro
version: v1.23.0
version: v2.0.1
args: release --clean
env:
VERSION: ${{ github.ref_name}}
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export VERSION?=dev
export TRACETEST_DEFAULT_CLOUD_ENDPOINT=https://app.tracetest.io
TAG?=$(VERSION)
GORELEASER_VERSION=1.23.0-pro
GORELEASER_VERSION=2.0.1-pro

PROJECT_ROOT=${PWD}

Expand Down
36 changes: 36 additions & 0 deletions api/users.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
openapi: 3.0.1

components:
requestBodies:
AfterLogin:
description: After login request
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/AfterLogin"
schemas:
AfterLogin:
type: object
properties:
userId:
type: string
email:
type: string
name:
type: string
User:
required:
- id
- name
- emails
type: object
properties:
id:
type: string
name:
type: string
emails:
type: array
items:
type: string
66 changes: 64 additions & 2 deletions server/openapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,29 @@ import (
// The ApiApiRouter implementation should parse necessary information from the http request,
// pass the data to a ApiApiServicer to perform the required actions, then write the service results to the http response.
type ApiApiRouter interface {
CreateEnvironment(http.ResponseWriter, *http.Request)
CreateInvite(http.ResponseWriter, *http.Request)
CreateRunGroup(http.ResponseWriter, *http.Request)
CreateToken(http.ResponseWriter, *http.Request)
DeleteEnvironment(http.ResponseWriter, *http.Request)
DeleteInvite(http.ResponseWriter, *http.Request)
DeleteMonitorRun(http.ResponseWriter, *http.Request)
DeleteTestRun(http.ResponseWriter, *http.Request)
DeleteTestSuiteRun(http.ResponseWriter, *http.Request)
DeleteToken(http.ResponseWriter, *http.Request)
DryRunAssertion(http.ResponseWriter, *http.Request)
ExportTestRun(http.ResponseWriter, *http.Request)
ExpressionResolve(http.ResponseWriter, *http.Request)
GetEnvironment(http.ResponseWriter, *http.Request)
GetInvite(http.ResponseWriter, *http.Request)
GetMonitorRun(http.ResponseWriter, *http.Request)
GetMonitorRuns(http.ResponseWriter, *http.Request)
GetMonitorVersion(http.ResponseWriter, *http.Request)
GetOTLPConnectionInformation(http.ResponseWriter, *http.Request)
GetResources(http.ResponseWriter, *http.Request)
GetRunGroup(http.ResponseWriter, *http.Request)
GetRunGroups(http.ResponseWriter, *http.Request)
GetRunResultJUnit(http.ResponseWriter, *http.Request)
GetRunsFromRunGroup(http.ResponseWriter, *http.Request)
GetTestResultSelectedSpans(http.ResponseWriter, *http.Request)
GetTestRun(http.ResponseWriter, *http.Request)
GetTestRunEvents(http.ResponseWriter, *http.Request)
Expand All @@ -42,16 +53,27 @@ type ApiApiRouter interface {
GetVersion(http.ResponseWriter, *http.Request)
GetWizard(http.ResponseWriter, *http.Request)
ImportTestRun(http.ResponseWriter, *http.Request)
ListEnvironments(http.ResponseWriter, *http.Request)
ListInvites(http.ResponseWriter, *http.Request)
ListTokens(http.ResponseWriter, *http.Request)
RerunTestRun(http.ResponseWriter, *http.Request)
ResetOTLPConnectionInformation(http.ResponseWriter, *http.Request)
RunMonitor(http.ResponseWriter, *http.Request)
RunTest(http.ResponseWriter, *http.Request)
RunTestSuite(http.ResponseWriter, *http.Request)
SearchSpans(http.ResponseWriter, *http.Request)
SkipTraceCollection(http.ResponseWriter, *http.Request)
StopTestRun(http.ResponseWriter, *http.Request)
TestAlert(http.ResponseWriter, *http.Request)
TestConnection(http.ResponseWriter, *http.Request)
UpdateEnvironment(http.ResponseWriter, *http.Request)
UpdateInvite(http.ResponseWriter, *http.Request)
UpdateTestRun(http.ResponseWriter, *http.Request)
UpdateToken(http.ResponseWriter, *http.Request)
UpdateWizard(http.ResponseWriter, *http.Request)
UpsertEnvironment(http.ResponseWriter, *http.Request)
UpsertInvite(http.ResponseWriter, *http.Request)
UpsertToken(http.ResponseWriter, *http.Request)
}

// ResourceApiApiRouter defines the required methods for binding the api requests to a responses for the ResourceApiApi
Expand All @@ -60,18 +82,23 @@ type ApiApiRouter interface {
type ResourceApiApiRouter interface {
CreateDemo(http.ResponseWriter, *http.Request)
CreateLinter(http.ResponseWriter, *http.Request)
CreatePollingProfile(http.ResponseWriter, *http.Request)
CreateTest(http.ResponseWriter, *http.Request)
CreateTestSuite(http.ResponseWriter, *http.Request)
CreateVariableSet(http.ResponseWriter, *http.Request)
CreteMonitor(http.ResponseWriter, *http.Request)
DeleteDemo(http.ResponseWriter, *http.Request)
DeleteLinter(http.ResponseWriter, *http.Request)
DeleteMonitor(http.ResponseWriter, *http.Request)
DeletePollingProfile(http.ResponseWriter, *http.Request)
DeleteTest(http.ResponseWriter, *http.Request)
DeleteTestSuite(http.ResponseWriter, *http.Request)
DeleteVariableSet(http.ResponseWriter, *http.Request)
GetConfiguration(http.ResponseWriter, *http.Request)
GetDataStore(http.ResponseWriter, *http.Request)
GetDemo(http.ResponseWriter, *http.Request)
GetLinter(http.ResponseWriter, *http.Request)
GetMonitor(http.ResponseWriter, *http.Request)
GetPollingProfile(http.ResponseWriter, *http.Request)
GetTest(http.ResponseWriter, *http.Request)
GetTestSuite(http.ResponseWriter, *http.Request)
Expand All @@ -82,16 +109,20 @@ type ResourceApiApiRouter interface {
ListDataStore(http.ResponseWriter, *http.Request)
ListDemos(http.ResponseWriter, *http.Request)
ListLinters(http.ResponseWriter, *http.Request)
ListMonitors(http.ResponseWriter, *http.Request)
ListPollingProfile(http.ResponseWriter, *http.Request)
ListVariableSets(http.ResponseWriter, *http.Request)
UpdateConfiguration(http.ResponseWriter, *http.Request)
UpdateDataStore(http.ResponseWriter, *http.Request)
UpdateDemo(http.ResponseWriter, *http.Request)
UpdateLinter(http.ResponseWriter, *http.Request)
UpdateMonitor(http.ResponseWriter, *http.Request)
UpdatePollingProfile(http.ResponseWriter, *http.Request)
UpdateTest(http.ResponseWriter, *http.Request)
UpdateTestSuite(http.ResponseWriter, *http.Request)
UpdateVariableSet(http.ResponseWriter, *http.Request)
UpsertMonitor(http.ResponseWriter, *http.Request)
UpsertPollingProfile(http.ResponseWriter, *http.Request)
UpsertTest(http.ResponseWriter, *http.Request)
}

Expand All @@ -100,18 +131,29 @@ type ResourceApiApiRouter interface {
// while the service implementation can be ignored with the .openapi-generator-ignore file
// and updated with the logic required for the API.
type ApiApiServicer interface {
CreateEnvironment(context.Context, EnvironmentResource) (ImplResponse, error)
CreateInvite(context.Context, InviteResource) (ImplResponse, error)
CreateRunGroup(context.Context, RunGroup) (ImplResponse, error)
CreateToken(context.Context, Token) (ImplResponse, error)
DeleteEnvironment(context.Context, string) (ImplResponse, error)
DeleteInvite(context.Context, string) (ImplResponse, error)
DeleteMonitorRun(context.Context, string, int32) (ImplResponse, error)
DeleteTestRun(context.Context, string, int32) (ImplResponse, error)
DeleteTestSuiteRun(context.Context, string, int32) (ImplResponse, error)
DeleteToken(context.Context, string) (ImplResponse, error)
DryRunAssertion(context.Context, string, int32, TestSpecs) (ImplResponse, error)
ExportTestRun(context.Context, string, int32) (ImplResponse, error)
ExpressionResolve(context.Context, ResolveRequestInfo) (ImplResponse, error)
GetEnvironment(context.Context, string) (ImplResponse, error)
GetInvite(context.Context, string) (ImplResponse, error)
GetMonitorRun(context.Context, string, int32) (ImplResponse, error)
GetMonitorRuns(context.Context, string, int32, int32) (ImplResponse, error)
GetMonitorVersion(context.Context, string, int32) (ImplResponse, error)
GetOTLPConnectionInformation(context.Context) (ImplResponse, error)
GetResources(context.Context, int32, int32, string, string, string) (ImplResponse, error)
GetRunGroup(context.Context, string) (ImplResponse, error)
GetRunGroups(context.Context, int32, int32, string, string, string) (ImplResponse, error)
GetRunResultJUnit(context.Context, string, int32) (ImplResponse, error)
GetRunsFromRunGroup(context.Context, int32, int32, string) (ImplResponse, error)
GetTestResultSelectedSpans(context.Context, string, int32, string) (ImplResponse, error)
GetTestRun(context.Context, string, int32) (ImplResponse, error)
GetTestRunEvents(context.Context, string, int32) (ImplResponse, error)
Expand All @@ -124,16 +166,27 @@ type ApiApiServicer interface {
GetVersion(context.Context, string) (ImplResponse, error)
GetWizard(context.Context) (ImplResponse, error)
ImportTestRun(context.Context, ExportedTestInformation) (ImplResponse, error)
ListEnvironments(context.Context, int32, int32, string, string) (ImplResponse, error)
ListInvites(context.Context, int32, int32, string, string) (ImplResponse, error)
ListTokens(context.Context, int32, int32, string, string) (ImplResponse, error)
RerunTestRun(context.Context, string, int32) (ImplResponse, error)
ResetOTLPConnectionInformation(context.Context) (ImplResponse, error)
RunMonitor(context.Context, string, RunMonitorInformation) (ImplResponse, error)
RunTest(context.Context, string, RunInformation) (ImplResponse, error)
RunTestSuite(context.Context, string, RunInformation) (ImplResponse, error)
SearchSpans(context.Context, string, int32, SearchSpansRequest) (ImplResponse, error)
SkipTraceCollection(context.Context, string, int32) (ImplResponse, error)
StopTestRun(context.Context, string, int32) (ImplResponse, error)
TestAlert(context.Context, Alert) (ImplResponse, error)
TestConnection(context.Context, DataStore) (ImplResponse, error)
UpdateEnvironment(context.Context, string, EnvironmentResource) (ImplResponse, error)
UpdateInvite(context.Context, string, InviteResource) (ImplResponse, error)
UpdateTestRun(context.Context, string, int32, TestRun) (ImplResponse, error)
UpdateToken(context.Context, string) (ImplResponse, error)
UpdateWizard(context.Context, Wizard) (ImplResponse, error)
UpsertEnvironment(context.Context, EnvironmentResource) (ImplResponse, error)
UpsertInvite(context.Context, InviteResource) (ImplResponse, error)
UpsertToken(context.Context, Token) (ImplResponse, error)
}

// ResourceApiApiServicer defines the api actions for the ResourceApiApi service
Expand All @@ -143,18 +196,23 @@ type ApiApiServicer interface {
type ResourceApiApiServicer interface {
CreateDemo(context.Context, Demo) (ImplResponse, error)
CreateLinter(context.Context, LinterResource) (ImplResponse, error)
CreatePollingProfile(context.Context, PollingProfile) (ImplResponse, error)
CreateTest(context.Context, TestResource) (ImplResponse, error)
CreateTestSuite(context.Context, TestSuiteResource) (ImplResponse, error)
CreateVariableSet(context.Context, VariableSetResource) (ImplResponse, error)
CreteMonitor(context.Context, MonitorResource) (ImplResponse, error)
DeleteDemo(context.Context, string) (ImplResponse, error)
DeleteLinter(context.Context, string) (ImplResponse, error)
DeleteMonitor(context.Context, string) (ImplResponse, error)
DeletePollingProfile(context.Context, string) (ImplResponse, error)
DeleteTest(context.Context, string) (ImplResponse, error)
DeleteTestSuite(context.Context, string) (ImplResponse, error)
DeleteVariableSet(context.Context, string) (ImplResponse, error)
GetConfiguration(context.Context, string) (ImplResponse, error)
GetDataStore(context.Context, string) (ImplResponse, error)
GetDemo(context.Context, string) (ImplResponse, error)
GetLinter(context.Context, string) (ImplResponse, error)
GetMonitor(context.Context, string) (ImplResponse, error)
GetPollingProfile(context.Context, string) (ImplResponse, error)
GetTest(context.Context, string) (ImplResponse, error)
GetTestSuite(context.Context, string) (ImplResponse, error)
Expand All @@ -165,15 +223,19 @@ type ResourceApiApiServicer interface {
ListDataStore(context.Context, int32, int32, string, string) (ImplResponse, error)
ListDemos(context.Context, int32, int32, string, string) (ImplResponse, error)
ListLinters(context.Context, int32, int32, string, string) (ImplResponse, error)
ListMonitors(context.Context) (ImplResponse, error)
ListPollingProfile(context.Context, int32, int32, string, string) (ImplResponse, error)
ListVariableSets(context.Context, int32, int32, string, string) (ImplResponse, error)
UpdateConfiguration(context.Context, string, ConfigurationResource) (ImplResponse, error)
UpdateDataStore(context.Context, string, DataStore) (ImplResponse, error)
UpdateDemo(context.Context, string, Demo) (ImplResponse, error)
UpdateLinter(context.Context, string, LinterResource) (ImplResponse, error)
UpdateMonitor(context.Context, string, MonitorResource) (ImplResponse, error)
UpdatePollingProfile(context.Context, string, PollingProfile) (ImplResponse, error)
UpdateTest(context.Context, string, TestResource) (ImplResponse, error)
UpdateTestSuite(context.Context, string, TestSuiteResource) (ImplResponse, error)
UpdateVariableSet(context.Context, string, VariableSetResource) (ImplResponse, error)
UpsertMonitor(context.Context, MonitorResource) (ImplResponse, error)
UpsertPollingProfile(context.Context, PollingProfile) (ImplResponse, error)
UpsertTest(context.Context, TestResource) (ImplResponse, error)
}
Loading

0 comments on commit 704021d

Please sign in to comment.