Documentation
¶
Index ¶
- type Service
- func (s *Service) API(ctx context.Context, id string) (*resources.API, error)
- func (s *Service) APIRelations(ctx context.Context, apiID, apiVersionID string) (*resources.APIRelations, error)
- func (s *Service) APIVersion(ctx context.Context, apiID, id string) (*resources.APIVersion, error)
- func (s *Service) APIVersions(ctx context.Context, apiID string) (*resources.APIVersionListItems, error)
- func (s *Service) APIs(ctx context.Context, workspace string) (*resources.APIListItems, error)
- func (s *Service) Collection(ctx context.Context, id string) (*resources.Collection, error)
- func (s *Service) Collections(ctx context.Context) (*resources.CollectionListItems, error)
- func (s *Service) CreateAPIFromReader(ctx context.Context, reader io.Reader, workspace string) (string, error)
- func (s *Service) CreateAPIVersionFromReader(ctx context.Context, reader io.Reader, workspace, apiID string) (string, error)
- func (s *Service) CreateCollectionFromReader(ctx context.Context, reader io.Reader, workspace string) (string, error)
- func (s *Service) CreateEnvironmentFromReader(ctx context.Context, reader io.Reader, workspace string) (string, error)
- func (s *Service) CreateFromReader(ctx context.Context, t resources.ResourceType, reader io.Reader, ...) (string, error)
- func (s *Service) CreateMockFromReader(ctx context.Context, reader io.Reader, workspace string) (string, error)
- func (s *Service) CreateMonitorFromReader(ctx context.Context, reader io.Reader, workspace string) (string, error)
- func (s *Service) CreateSchemaFromReader(ctx context.Context, reader io.Reader, workspace, apiID, apiVersionID string) (string, error)
- func (s *Service) CreateWorkspaceFromReader(ctx context.Context, reader io.Reader, workspace string) (string, error)
- func (s *Service) Delete(ctx context.Context, t resources.ResourceType, urlParams map[string]string) (string, error)
- func (s *Service) DeleteAPI(ctx context.Context, resourceID string) (string, error)
- func (s *Service) DeleteAPIVersion(ctx context.Context, resourceID, apiID string) (string, error)
- func (s *Service) DeleteCollection(ctx context.Context, resourceID string) (string, error)
- func (s *Service) DeleteEnvironment(ctx context.Context, resourceID string) (string, error)
- func (s *Service) DeleteMock(ctx context.Context, resourceID string) (string, error)
- func (s *Service) DeleteMonitor(ctx context.Context, resourceID string) (string, error)
- func (s *Service) DeleteSchema(ctx context.Context, resourceID, apiID, apiVersionID string) (string, error)
- func (s *Service) DeleteWorkspace(ctx context.Context, resourceID string) (string, error)
- func (s *Service) Environment(ctx context.Context, id string) (*resources.Environment, error)
- func (s *Service) Environments(ctx context.Context) (*resources.EnvironmentListItems, error)
- func (s *Service) ForkCollection(ctx context.Context, id, workspace, label string) (string, error)
- func (s *Service) FormattedAPIRelationItems(ctx context.Context, apiID, apiVersionID string) (*resources.FormattedAPIRelationItems, error)
- func (s *Service) MergeCollection(ctx context.Context, id, destination, strategy string) (string, error)
- func (s *Service) Mock(ctx context.Context, id string) (*resources.Mock, error)
- func (s *Service) Mocks(ctx context.Context) (*resources.MockListItems, error)
- func (s *Service) Monitor(ctx context.Context, id string) (*resources.Monitor, error)
- func (s *Service) Monitors(ctx context.Context) (*resources.MonitorListItems, error)
- func (s *Service) ReplaceAPIFromReader(ctx context.Context, reader io.Reader, resourceID string) (string, error)
- func (s *Service) ReplaceAPIVersionFromReader(ctx context.Context, reader io.Reader, resourceID, apiID string) (string, error)
- func (s *Service) ReplaceCollectionFromReader(ctx context.Context, reader io.Reader, resourceID string) (string, error)
- func (s *Service) ReplaceEnvironmentFromReader(ctx context.Context, reader io.Reader, resourceID string) (string, error)
- func (s *Service) ReplaceFromReader(ctx context.Context, t resources.ResourceType, reader io.Reader, ...) (string, error)
- func (s *Service) ReplaceMockFromReader(ctx context.Context, reader io.Reader, resourceID string) (string, error)
- func (s *Service) ReplaceMonitorFromReader(ctx context.Context, reader io.Reader, resourceID string) (string, error)
- func (s *Service) ReplaceSchemaFromReader(ctx context.Context, reader io.Reader, resourceID, apiID, apiVersionID string) (string, error)
- func (s *Service) ReplaceWorkspaceFromReader(ctx context.Context, reader io.Reader, resourceID string) (string, error)
- func (s *Service) RunMonitor(ctx context.Context, id string) (json.RawMessage, error)
- func (s *Service) Schema(ctx context.Context, apiID, apiVersionID, id string) (*resources.Schema, error)
- func (s *Service) User(ctx context.Context) (*resources.User, error)
- func (s *Service) Workspace(ctx context.Context, id string) (*resources.Workspace, error)
- func (s *Service) Workspaces(ctx context.Context) (*resources.WorkspaceListItems, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
Service is used by Postman API consumers.
func NewService ¶
NewService returns a new instance of the Postman API service client.
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 ¶
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) Collection ¶
Collection returns a single collection.
func (*Service) Collections ¶
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) DeleteAPIVersion ¶
DeleteAPIVersion deletes a API Version.
func (*Service) DeleteCollection ¶
DeleteCollection deletes a collection.
func (*Service) DeleteEnvironment ¶
DeleteEnvironment deletes a environment.
func (*Service) DeleteMock ¶
DeleteMock deletes a mock.
func (*Service) DeleteMonitor ¶
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 ¶
DeleteWorkspace deletes a API.
func (*Service) Environment ¶
Environment returns a single environment.
func (*Service) Environments ¶
Environments returns all environments.
func (*Service) ForkCollection ¶
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) 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 ¶
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) Workspaces ¶
Workspaces returns the workspaces for the current user.