Skip to content

Instantly share code, notes, and snippets.

@poolpOrg
Created May 26, 2020 21:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save poolpOrg/b3b97a65791a11a49f5e76ea51331ae4 to your computer and use it in GitHub Desktop.
Save poolpOrg/b3b97a65791a11a49f5e76ea51331ae4 to your computer and use it in GitHub Desktop.
package main
import (
"github.com/poolpOrg/go-opensmtpd/table"
)
func check(token string, service table.LookupService, key string) {
//table.Boolean(token, true)
//table.Boolean(token, false)
table.Failure(token)
}
func lookup(token string, service table.LookupService, key string) {
//table.Result(token)
//table.Result(token, "foobar")
table.Failure(token)
}
func fetch(token string, service table.LookupService) {
//table.Result(token)
//table.Result(token, "foobar")
table.Failure(token)
}
func main() {
table.OnCheck(check)
table.OnLookup(lookup)
table.OnFetch(fetch)
table.Dispatch()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment