Skip to content

eternal-flame-AD/gotify-plugin-api

 
 

Repository files navigation

plugin-api

Build Status GoDoc

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, 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:

$ 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):

$ 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

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 84.6%
  • Makefile 15.4%