importer

package
v1.6.16 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package `import` helps d, rIDevelopers switch to Lama2 from various popular tools. The conversion may not be perfect, but it should help teams get started with minimal manual effort

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PickEnvironmentID

func PickEnvironmentID(pJSON *gabs.Container) string

func PostmanConvert

func PostmanConvert(pJSON *gabs.Container, targetFolder string, environID string)

PostmanConvert takes in a Postman data file and generates a roughly equivalent Lama2 repository. Collections and subcollections become folders. Requests become files, environments get stored in `l2.env` while file attachments get copied relative to the API file

func PostmanImporter

func PostmanImporter(postmanFile string, outDir string)

func ReadPostmanFile

func ReadPostmanFile(postmanFile string) *gabs.Container

Types

type Environ

type Environ struct {
	Name   string
	Values map[string]string
	Ident  string
}

type Folder

type Folder struct {
	Name     string
	Ident    string
	Order    []string
	FullPath string
}

type Request

type Request struct {
	TheURL       string
	Name         string
	IsMultipart  bool
	Auth         string
	RequestType  string
	RawModeData  string
	MultiData    map[string]string
	ParentFolder string
	HeaderData   map[string]string
	Ident        string
	FilesData    map[string]string
}

Jump to

Keyboard shortcuts

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