sdk

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	Options *client.Options
}

Service is used by Postman API consumers.

func NewService

func NewService(options *client.Options) *Service

NewService returns a new instance of the Postman API service client.

func (*Service) API

func (s *Service) API(ctx context.Context, id string) (*resources.API, error)

API returns a single API.

func (*Service) APIRelations

func (s *Service) APIRelations(ctx context.Context, apiID, apiVersionID string) (*resources.APIRelations, error)

APIRelations returns the linked relations of an API

func (*Service) APIVersion

func (s *Service) APIVersion(ctx context.Context, apiID, id string) (*resources.APIVersion, error)

APIVersion returns a single API Version.

func (*Service) APIVersions

func (s *Service) APIVersions(ctx context.Context, apiID string) (*resources.APIVersionListItems, error)

APIVersions returns all API Versions.

func (*Service) APIs

func (s *Service) APIs(ctx context.Context, workspace string) (*resources.APIListItems, error)

APIs returns all APIs.

func (*Service) Collection

func (s *Service) Collection(ctx context.Context, id string) (*resources.Collection, error)

Collection returns a single collection.

func (*Service) Collections

func (s *Service) Collections(ctx context.Context) (*resources.CollectionListItems, error)

Collections returns all collections.

func (*Service) CreateAPIFromReader

func (s *Service) CreateAPIFromReader(ctx context.Context, reader io.Reader, workspace string) (string, error)

CreateAPIFromReader creates a new API.

func (*Service) CreateAPIVersionFromReader

func (s *Service) CreateAPIVersionFromReader(ctx context.Context, reader io.Reader, workspace, apiID string) (string, error)

CreateAPIVersionFromReader creates a new API Version.

func (*Service) CreateCollectionFromReader

func (s *Service) CreateCollectionFromReader(ctx context.Context, reader io.Reader, workspace string) (string, error)

CreateCollectionFromReader creates a new collection.

func (*Service) CreateEnvironmentFromReader

func (s *Service) CreateEnvironmentFromReader(ctx context.Context, reader io.Reader, workspace string) (string, error)

CreateEnvironmentFromReader creates a new environment.

func (*Service) CreateFromReader

func (s *Service) CreateFromReader(ctx context.Context, t resources.ResourceType, reader io.Reader, queryParams, urlParams map[string]string) (string, error)

CreateFromReader posts a new resource to the Postman API.

func (*Service) CreateMockFromReader

func (s *Service) CreateMockFromReader(ctx context.Context, reader io.Reader, workspace string) (string, error)

CreateMockFromReader creates a new mock.

func (*Service) CreateMonitorFromReader

func (s *Service) CreateMonitorFromReader(ctx context.Context, reader io.Reader, workspace string) (string, error)

CreateMonitorFromReader creates a new monitor.

func (*Service) CreateSchemaFromReader

func (s *Service) CreateSchemaFromReader(ctx context.Context, reader io.Reader, workspace, apiID, apiVersionID string) (string, error)

CreateSchemaFromReader creates a new API Version.

func (*Service) CreateWorkspaceFromReader

func (s *Service) CreateWorkspaceFromReader(ctx context.Context, reader io.Reader, workspace string) (string, error)

CreateWorkspaceFromReader creates a new API.

func (*Service) Delete

func (s *Service) Delete(ctx context.Context, t resources.ResourceType, urlParams map[string]string) (string, error)

Delete posts a new resource to the Postman API.

func (*Service) DeleteAPI

func (s *Service) DeleteAPI(ctx context.Context, resourceID string) (string, error)

DeleteAPI deletes a API.

func (*Service) DeleteAPIVersion

func (s *Service) DeleteAPIVersion(ctx context.Context, resourceID, apiID string) (string, error)

DeleteAPIVersion deletes a API Version.

func (*Service) DeleteCollection

func (s *Service) DeleteCollection(ctx context.Context, resourceID string) (string, error)

DeleteCollection deletes a collection.

func (*Service) DeleteEnvironment

func (s *Service) DeleteEnvironment(ctx context.Context, resourceID string) (string, error)

DeleteEnvironment deletes a environment.

func (*Service) DeleteMock

func (s *Service) DeleteMock(ctx context.Context, resourceID string) (string, error)

DeleteMock deletes a mock.

func (*Service) DeleteMonitor

func (s *Service) DeleteMonitor(ctx context.Context, resourceID string) (string, error)

DeleteMonitor deletes a monitor.

func (*Service) DeleteSchema

func (s *Service) DeleteSchema(ctx context.Context, resourceID, apiID, apiVersionID string) (string, error)

DeleteSchema deletes a API Version.

func (*Service) DeleteWorkspace

func (s *Service) DeleteWorkspace(ctx context.Context, resourceID string) (string, error)

DeleteWorkspace deletes a API.

func (*Service) Environment

func (s *Service) Environment(ctx context.Context, id string) (*resources.Environment, error)

Environment returns a single environment.

func (*Service) Environments

func (s *Service) Environments(ctx context.Context) (*resources.EnvironmentListItems, error)

Environments returns all environments.

func (*Service) ForkCollection

func (s *Service) ForkCollection(ctx context.Context, id, workspace, label string) (string, error)

ForkCollection makes a fork of an existing collection.

func (*Service) FormattedAPIRelationItems

func (s *Service) FormattedAPIRelationItems(ctx context.Context, apiID, apiVersionID string) (*resources.FormattedAPIRelationItems, error)

FormattedAPIRelationItems returns the formatted linked relations of an API

func (*Service) MergeCollection

func (s *Service) MergeCollection(ctx context.Context, id, destination, strategy string) (string, error)

MergeCollection makes a fork of an existing collection.

func (*Service) Mock

func (s *Service) Mock(ctx context.Context, id string) (*resources.Mock, error)

Mock returns a single mock for the current user.

func (*Service) Mocks

func (s *Service) Mocks(ctx context.Context) (*resources.MockListItems, error)

Mocks returns the mocks for the current user.

func (*Service) Monitor

func (s *Service) Monitor(ctx context.Context, id string) (*resources.Monitor, error)

Monitor returns a single monitor for the current user.

func (*Service) Monitors

func (s *Service) Monitors(ctx context.Context) (*resources.MonitorListItems, error)

Monitors returns the monitors for the current user.

func (*Service) ReplaceAPIFromReader

func (s *Service) ReplaceAPIFromReader(ctx context.Context, reader io.Reader, resourceID string) (string, error)

ReplaceAPIFromReader replaces an existing API.

func (*Service) ReplaceAPIVersionFromReader

func (s *Service) ReplaceAPIVersionFromReader(ctx context.Context, reader io.Reader, resourceID, apiID string) (string, error)

ReplaceAPIVersionFromReader replaces an existing API Version.

func (*Service) ReplaceCollectionFromReader

func (s *Service) ReplaceCollectionFromReader(ctx context.Context, reader io.Reader, resourceID string) (string, error)

ReplaceCollectionFromReader replaces a collection.

func (*Service) ReplaceEnvironmentFromReader

func (s *Service) ReplaceEnvironmentFromReader(ctx context.Context, reader io.Reader, resourceID string) (string, error)

ReplaceEnvironmentFromReader replaces an existing environment.

func (*Service) ReplaceFromReader

func (s *Service) ReplaceFromReader(ctx context.Context, t resources.ResourceType, reader io.Reader, urlParams map[string]string) (string, error)

ReplaceFromReader posts a new resource to the Postman API.

func (*Service) ReplaceMockFromReader

func (s *Service) ReplaceMockFromReader(ctx context.Context, reader io.Reader, resourceID string) (string, error)

ReplaceMockFromReader replaces an existing mock.

func (*Service) ReplaceMonitorFromReader

func (s *Service) ReplaceMonitorFromReader(ctx context.Context, reader io.Reader, resourceID string) (string, error)

ReplaceMonitorFromReader replaces an existing monitor.

func (*Service) ReplaceSchemaFromReader

func (s *Service) ReplaceSchemaFromReader(ctx context.Context, reader io.Reader, resourceID, apiID, apiVersionID string) (string, error)

ReplaceSchemaFromReader replaces an existing API Version.

func (*Service) ReplaceWorkspaceFromReader

func (s *Service) ReplaceWorkspaceFromReader(ctx context.Context, reader io.Reader, resourceID string) (string, error)

ReplaceWorkspaceFromReader replaces an existing API.

func (*Service) RunMonitor

func (s *Service) RunMonitor(ctx context.Context, id string) (json.RawMessage, error)

RunMonitor runs a Postman monitor.

func (*Service) Schema

func (s *Service) Schema(ctx context.Context, apiID, apiVersionID, id string) (*resources.Schema, error)

Schema returns a single schema for an API version.

func (*Service) User

func (s *Service) User(ctx context.Context) (*resources.User, error)

User returns the current user.

func (*Service) Workspace

func (s *Service) Workspace(ctx context.Context, id string) (*resources.Workspace, error)

Workspace returns a single workspace for the current user.

func (*Service) Workspaces

func (s *Service) Workspaces(ctx context.Context) (*resources.WorkspaceListItems, error)

Workspaces returns the workspaces for the current user.

Directories

Path Synopsis
gen

Jump to

Keyboard shortcuts

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