tenant

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2022 License: BSD-3-Clause Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIKeyCreate added in v0.1.1

func APIKeyCreate(c *gin.Context)

func APIKeyDelete added in v0.1.1

func APIKeyDelete(c *gin.Context)

func APIKeyDetail added in v0.1.1

func APIKeyDetail(c *gin.Context)

func APIKeyList added in v0.1.1

func APIKeyList(c *gin.Context)

func APIKeyUpdate added in v0.1.1

func APIKeyUpdate(c *gin.Context)

func MemberCreate added in v0.1.1

func MemberCreate(c *gin.Context)

func MemberDelete added in v0.1.1

func MemberDelete(c *gin.Context)

func MemberDetail added in v0.1.1

func MemberDetail(c *gin.Context)

func MemberList added in v0.1.1

func MemberList(c *gin.Context)

func MemberUpdate added in v0.1.1

func MemberUpdate(c *gin.Context)

func ProjectCreate added in v0.1.1

func ProjectCreate(c *gin.Context)

func ProjectDelete added in v0.1.1

func ProjectDelete(c *gin.Context)

func ProjectDetail added in v0.1.1

func ProjectDetail(c *gin.Context)

func ProjectList added in v0.1.1

func ProjectList(c *gin.Context)

func ProjectUpdate added in v0.1.1

func ProjectUpdate(c *gin.Context)

func TenantCreate added in v0.1.1

func TenantCreate(c *gin.Context)

func TenantDelete added in v0.1.1

func TenantDelete(c *gin.Context)

func TenantDetail added in v0.1.1

func TenantDetail(c *gin.Context)

func TenantList added in v0.1.1

func TenantList(c *gin.Context)

func TenantUpdate added in v0.1.1

func TenantUpdate(c *gin.Context)

func TopicCreate added in v0.1.1

func TopicCreate(c *gin.Context)

func TopicDelete added in v0.1.1

func TopicDelete(c *gin.Context)

func TopicDetail added in v0.1.1

func TopicDetail(c *gin.Context)

func TopicList added in v0.1.1

func TopicList(c *gin.Context)

func TopicUpdate added in v0.1.1

func TopicUpdate(c *gin.Context)

Types

type Server

type Server struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Server implements the API router and handlers.

func New

func New(conf config.Config) (s *Server, err error)

func (*Server) Available

func (s *Server) Available() gin.HandlerFunc

Available is middleware that uses healthy boolean to return a service unavailable http status code if the server is shutting down or in maintenance mode. This middleware must be fairly early on in the chain to ensure that complex handling does not slow the shutdown of the server.

func (*Server) Healthy

func (s *Server) Healthy() bool

func (*Server) Serve

func (s *Server) Serve() (err error)

Serves API requests while listening on the specified bind address.

func (*Server) SetHealth

func (s *Server) SetHealth(health bool)

func (*Server) SetURL

func (s *Server) SetURL(url string)

func (*Server) Shutdown

func (s *Server) Shutdown() (err error)

Shuts down the server gracefully

func (*Server) SignUp

func (s *Server) SignUp(c *gin.Context)

Signs up a contact to receive notifications from SendGrid by making a request to the SendGrid add contacts marketing API. The SendGrid API is asynchronous, which means that it doesn't return success if the user is registered. Instead a job ID is returned and the endpoint has to check if the registration was actually successful or not. To not block this endpoint, sign up doesn't check success but returns ok if the registration was correctly submitted.

TODO: check for when the user is successfully signed up then send a welcome email. TODO: move all sendgrid-specific functionality into its own helper package. TODO: search for ensign list ID rather than configuring it externally.

func (*Server) Status

func (s *Server) Status(c *gin.Context)

Status handler returns the current health status of the server

func (*Server) URL

func (s *Server) URL() string

Directories

Path Synopsis
api
v1

Jump to

Keyboard shortcuts

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