https://github.com/gotify/plugin-api
The Plugin-API supported by gotify/server.
https://github.com/gotify/plugin-api
golang gotify plugin-api
Last synced: 10 months ago
JSON representation
The Plugin-API supported by gotify/server.
- Host: GitHub
- URL: https://github.com/gotify/plugin-api
- Owner: gotify
- License: mit
- Created: 2019-01-10T17:11:03.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-02T11:51:08.000Z (about 7 years ago)
- Last Synced: 2025-04-02T00:22:35.845Z (11 months ago)
- Topics: golang, gotify, plugin-api
- Language: Go
- Homepage: https://gotify.net/docs/plugin
- Size: 12.7 KB
- Stars: 12
- Watchers: 5
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# plugin-api
[](https://travis-ci.org/gotify/plugin-api)
[](https://godoc.org/github.com/gotify/plugin-api)
This repository consisted of APIs used in gotify plugins.
## Usage
### Plugin API
https://gotify.net/docs/plugin
### CLI tools
#### `github.com/gotify/cmd/gomod-cap`
Since `go.mod` follows a [minimal version selection](https://github.com/golang/proposal/blob/master/design/24301-versioned-go.md), packages are built with the lowest common version requirement defined in `go.mod`. This poses a problem when developing plugins:
If the gotify server is built with the following go.mod:
```
require some/package v0.1.0
```
But when the plugin is built, it used a newer version of this package:
```
require some/package v0.1.1
```
Since the server is built with `v0.1.0` and the plugin is built with `v0.1.1` of `some/package`, the built plugin could not be loaded due to different import package versions.
`gomod-cap` is a simple util to ensure that plugin `go.mod` files does not have higher version requirements than the main gotify `go.mod` file.
To resolve all incompatible requirements:
```bash
$ go run github.com/gotify/plugin-api/cmd/gomod-cap -from /path/to/gotify/server/go.mod -to /path/to/plugin/go.mod
```
To only check for incompatible requirements(useful in CI):
```bash
$ go run github.com/gotify/plugin-api/cmd/gomod-cap -from /path/to/gotify/server/go.mod -to /path/to/plugin/go.mod -check=true
```