Documentation
¶
Index ¶
- func ImportOpenAPISpec(data []byte, repo repository.RepositoryV2) error
- func ImportPostmanCollection(data []byte, repo repository.RepositoryV2) error
- func ImportPostmanCollectionFromFile(filePath string, repo repository.RepositoryV2) error
- func ImportPostmanEnvironment(data []byte, repo repository.RepositoryV2) error
- func ImportPostmanEnvironmentFromFile(filePath string, repo repository.RepositoryV2) error
- func ImportProtoFile(data []byte, repo repository.RepositoryV2, filePath ...string) error
- func ImportProtoFileFromFile(filePath string, repo repository.RepositoryV2) error
- type ApiKey
- type PostmanCollection
- type PostmanEnvironment
- type PostmanEnvironmentVariable
- type RequestItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ImportOpenAPISpec ¶ added in v0.4.3
func ImportOpenAPISpec(data []byte, repo repository.RepositoryV2) error
ImportOpenAPISpec imports an OpenAPI 3.0 specification using kin-openapi library
func ImportPostmanCollection ¶
func ImportPostmanCollection(data []byte, repo repository.RepositoryV2) error
func ImportPostmanCollectionFromFile ¶
func ImportPostmanCollectionFromFile(filePath string, repo repository.RepositoryV2) error
func ImportPostmanEnvironment ¶
func ImportPostmanEnvironment(data []byte, repo repository.RepositoryV2) error
func ImportPostmanEnvironmentFromFile ¶
func ImportPostmanEnvironmentFromFile(filePath string, repo repository.RepositoryV2) error
func ImportProtoFile ¶ added in v0.4.3
func ImportProtoFile(data []byte, repo repository.RepositoryV2, filePath ...string) error
ImportProtoFile imports a proto file and creates a collection with gRPC requests
func ImportProtoFileFromFile ¶ added in v0.4.3
func ImportProtoFileFromFile(filePath string, repo repository.RepositoryV2) error
ImportProtoFileFromFile imports a proto file from a file path and creates a collection with gRPC requests
Types ¶
type PostmanCollection ¶
type PostmanCollection struct {
Info struct {
Name string `json:"name"`
} `json:"info"`
Item []RequestItem `json:"item"`
Auth *struct {
Type string `json:"type"`
ApiKey []ApiKey `json:"apikey,omitempty"`
} `json:"auth"`
}
PostmanCollection represents the structure of a Postman exported JSON
type PostmanEnvironment ¶
type PostmanEnvironment struct {
ID string `json:"id"`
Name string `json:"name"`
Values []PostmanEnvironmentVariable `json:"values"`
}
type RequestItem ¶
type RequestItem struct {
Name string `json:"name"`
// if request is a folder, it will have an item array
Item []RequestItem `json:"item,omitempty"`
Request struct {
Method string `json:"method"`
Header []struct {
Key string `json:"key"`
Value string `json:"value"`
} `json:"header"`
Body struct {
Mode string `json:"mode"`
Raw string `json:"raw"`
} `json:"body"`
URL struct {
Raw string `json:"raw"`
} `json:"url"`
} `json:"request"`
}
Click to show internal directories.
Click to hide internal directories.