functions

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package functions serves Azure ARM Microsoft.Web/sites (Function Apps) requests against a CloudEmu serverless driver. Real azure-sdk-for-go armappservice clients configured with a custom endpoint hit this handler the same way they hit management.azure.com.

MVP coverage:

PUT    .../sites/{name}      — CreateOrUpdate
GET    .../sites/{name}      — Get
GET    .../sites             — List in resource group / subscription
DELETE .../sites/{name}      — Delete
POST   /api/{name}           — Synchronous invoke (non-ARM, mirrors how
                               real Function Apps are hit at
                               <app>.azurewebsites.net/api/<name>)

Versions, slots, deployment, scaling, and Kudu/SCM endpoints are deferred.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler serves ARM JSON requests for Microsoft.Web/sites and direct invoke requests at /api/{name}.

func New

func New(fn sdrv.Serverless) *Handler

New returns a Functions handler backed by fn.

func (*Handler) Matches

func (*Handler) Matches(r *http.Request) bool

Matches accepts ARM Microsoft.Web/sites paths plus the non-ARM /api/{name} invoke shape.

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP routes requests by URL shape.

Jump to

Keyboard shortcuts

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