idp-plugin-sdk

module
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: Apache-2.0

README

idp-plugin-sdk

This SDK enables building aserto idp plugins using Go.

License ci

Tools

Building

Mage is used as a tool for building and testing etc.

List available mage targets:

mage -l

Check that your code is compiling:

mage build

Testing

mage test

Linting

mage deps
mage lint

Developing plugins

To start developing your own plugin, you need to implement PluginHandler and call plugin.Serve from your main func.

package main

import (
	"log"

	"github.com/aserto-dev/idp-plugin-sdk/examples/dummy/pkg/srv"
	"github.com/aserto-dev/idp-plugin-sdk/plugin"
)

func main() {

	dummyPlugin := srv.NewDummyPlugin()

	options := &plugin.PluginOptions{
		PluginHandler: dummyPlugin,
	}

	err := plugin.Serve(options)
	if err != nil {
		log.Println(err.Error())
	}
}

For a plugin example, check out aserto-idp-plugin-dummy

License

Apache 2.0 License

Directories

Path Synopsis
examples
dummy module
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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