Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomServer ¶
type CustomServer struct {
// contains filtered or unexported fields
}
CustomServer implements ServerMode with a custom setup function
func NewCustomServer ¶
func NewCustomServer(callbackURL string, setup func(context.Context, http.HandlerFunc) error) *CustomServer
NewCustomServer creates a custom server mode
func (*CustomServer) GetCallbackURL ¶
func (s *CustomServer) GetCallbackURL() string
func (*CustomServer) Setup ¶
func (s *CustomServer) Setup(ctx context.Context, handler http.HandlerFunc) error
type MuxHandler ¶
type MuxHandler struct {
// contains filtered or unexported fields
}
MuxHandler implements ServerMode using an existing http.ServeMux
func NewMuxHandler ¶
func NewMuxHandler(mux *http.ServeMux, path string, baseURL string) *MuxHandler
NewMuxHandler creates a mux handler mode
func (*MuxHandler) GetCallbackURL ¶
func (h *MuxHandler) GetCallbackURL() string
func (*MuxHandler) Setup ¶
func (h *MuxHandler) Setup(ctx context.Context, handler http.HandlerFunc) error
type ServerMode ¶
type ServerMode interface { // GetCallbackURL returns the full callback URL GetCallbackURL() string // Setup prepares the callback handler Setup(ctx context.Context, handler http.HandlerFunc) error // Cleanup performs any necessary cleanup Cleanup(ctx context.Context) error }
ServerMode determines how the OAuth callback is handled
type StandaloneServer ¶
type StandaloneServer struct {
// contains filtered or unexported fields
}
StandaloneServer implements ServerMode with its own HTTP server
func NewStandaloneServer ¶
func NewStandaloneServer(port int, path string) *StandaloneServer
NewStandaloneServer creates a standalone server mode
func (*StandaloneServer) GetCallbackURL ¶
func (s *StandaloneServer) GetCallbackURL() string
func (*StandaloneServer) Setup ¶
func (s *StandaloneServer) Setup(ctx context.Context, handler http.HandlerFunc) error
Click to show internal directories.
Click to hide internal directories.