Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 8.2% on proxy.golang.org

proxy.golang.org : github.com/mattermost/mattermost-plugin-incident-management/client

Package client provides a client for using the Workflows API. Usage: Construct a new Workflows client, then use the various services on the client to access different parts of the workflows API. For example: Some API methods have optional parameters that can be passed. For example: Using the https://godoc.org/context package, one can easily pass cancelation signals and deadlines to various services of the client for handling a request. In case there is no context available, then context.Background() can be used as a starting point. The workflows client does not directly handle authentication. Instead, when creating a new client, pass an http.Client that can handle authentication for you. The easiest and recommended way to do this is using the golang.org/x/oauth2 library, but you can always use any other library that provides an http.Client. If you have an OAuth2 access token (for example, a personal API token as per https://docs.mattermost.com/developer/personal-access-tokens.html), you can use it with the oauth2 library using: Note that when using an authenticated Client, all calls made by the client will include the specified OAuth token. Therefore, authenticated clients should almost never be shared between different users. See the oauth2 docs for complete instructions on using that library. All requests for resource collections (incidents, playbooks, eventsubscriptions, etc.) support pagination. Pagination options are described in the ir.ListOptions struct and passed to the list methods directly or as an embedded type of a more specific list options struct (for example ir.IncidentListOptions). Pages information is available via the ir.ListResult struct.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/mattermost/mattermost-plugin-incident-management/client
License: Apache-2.0
Latest release: over 2 years ago
First release: over 3 years ago
Namespace: github.com/mattermost/mattermost-plugin-incident-management
Last synced: 5 days ago

    Loading...
    Readme
    Loading...