gen

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const GITLAB_OPENAPI_DEFINITION_LOCATION = "https://gitlab.com/gitlab-org/gitlab/-/raw/master/doc/api/openapi/openapi.yaml"
View Source
const OUTPUT_FILEPATH = "mock/endpointpattern.go"
View Source
const OUTPUT_FILE_HEADER = `package mock

// Code generated; DO NOT EDIT.

`

Variables

This section is empty.

Functions

func FetchAPIDefinition

func FetchAPIDefinition(l log.Logger) []byte

func FormatToGolangVarName

func FormatToGolangVarName(l log.Logger, sr ScrapeResult) string

FormatToGolangVarName generated the proper golang variable name given a endpoint format from the API

func FormatToGolangVarNameAndValue

func FormatToGolangVarNameAndValue(l log.Logger, sr ScrapeResult) string

Types

type ScrapeResult

type ScrapeResult struct {
	HTTPMethod      string
	EndpointPattern string
}

Jump to

Keyboard shortcuts

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