Documentation ¶
Overview ¶
Package grpcp contains shared data between the host and plugins.
Index ¶
- Variables
- func ArrayToProtobufStruct(obj interface{}) ([]*structpb.Struct, error)
- func ConnectPlugin(logger ambient.AppLogger, pluginName string, pluginPath string) (ambient.Plugin, *plugin.Client, plugin.ClientProtocol, error)
- func ErrorHandler(err error) error
- func InterfaceToProtobufAny(obj interface{}) (*anypb.Any, error)
- func MapToProtobufStruct(obj map[string]interface{}) (*structpb.Struct, error)
- func ObjectToProtobufStruct(obj interface{}) (*structpb.Struct, error)
- func ProtobufAnyToInterface(s *anypb.Any, obj interface{}) error
- func ProtobufStructToArray(s []*structpb.Struct, obj interface{}) error
- func ProtobufStructToMap(s *structpb.Struct) map[string]interface{}
- func ProtobufStructToObject(s *structpb.Struct, obj interface{}) error
- type FuncMapper
- type FuncMapperImpl
- type GRPCAddRouterServer
- func (m *GRPCAddRouterServer) Delete(ctx context.Context, req *protodef.RouterRequest) (resp *protodef.Empty, err error)
- func (m *GRPCAddRouterServer) Error(ctx context.Context, req *protodef.RouterErrorRequest) (resp *protodef.Empty, err error)
- func (m *GRPCAddRouterServer) Get(ctx context.Context, req *protodef.RouterRequest) (resp *protodef.Empty, err error)
- func (m *GRPCAddRouterServer) Handle(ctx context.Context, req *protodef.RouterRequest) (resp *protodef.Empty, err error)
- func (m *GRPCAddRouterServer) Head(ctx context.Context, req *protodef.RouterRequest) (resp *protodef.Empty, err error)
- func (m *GRPCAddRouterServer) Options(ctx context.Context, req *protodef.RouterRequest) (resp *protodef.Empty, err error)
- func (m *GRPCAddRouterServer) Param(ctx context.Context, req *protodef.RouterParamRequest) (resp *protodef.RouterParamResponse, err error)
- func (m *GRPCAddRouterServer) Patch(ctx context.Context, req *protodef.RouterRequest) (resp *protodef.Empty, err error)
- func (m *GRPCAddRouterServer) Post(ctx context.Context, req *protodef.RouterRequest) (resp *protodef.Empty, err error)
- func (m *GRPCAddRouterServer) Put(ctx context.Context, req *protodef.RouterRequest) (resp *protodef.Empty, err error)
- type GRPCFuncMapperPlugin
- type GRPCFuncMapperServer
- type GRPCHandlerPlugin
- type GRPCHandlerServer
- type GRPCLoggerPlugin
- func (l *GRPCLoggerPlugin) Debug(format string, v ...interface{})
- func (l *GRPCLoggerPlugin) Error(format string, v ...interface{})
- func (l *GRPCLoggerPlugin) Info(format string, v ...interface{})
- func (l *GRPCLoggerPlugin) Log(level ambient.LogLevel, format string, v ...interface{})
- func (l *GRPCLoggerPlugin) Warn(format string, v ...interface{})
- type GRPCLoggerServer
- func (m *GRPCLoggerServer) Debug(ctx context.Context, req *protodef.LogFormat) (resp *protodef.Empty, err error)
- func (m *GRPCLoggerServer) Error(ctx context.Context, req *protodef.LogFormat) (resp *protodef.Empty, err error)
- func (m *GRPCLoggerServer) Info(ctx context.Context, req *protodef.LogFormat) (resp *protodef.Empty, err error)
- func (m *GRPCLoggerServer) Warn(ctx context.Context, req *protodef.LogFormat) (resp *protodef.Empty, err error)
- type GRPCPlugin
- func (m *GRPCPlugin) Assets(ctx context.Context, req *protodef.Empty) (*protodef.AssetsResponse, error)
- func (m *GRPCPlugin) Disable(ctx context.Context, req *protodef.Empty) (*protodef.Empty, error)
- func (m *GRPCPlugin) Enable(ctx context.Context, req *protodef.Toolkit) (*protodef.EnableResponse, error)
- func (m *GRPCPlugin) FuncMap(ctx context.Context, req *protodef.Empty) (*protodef.FuncMapResponse, error)
- func (m *GRPCPlugin) GrantRequests(ctx context.Context, req *protodef.Empty) (*protodef.GrantRequestsResponse, error)
- func (m *GRPCPlugin) Middleware(ctx context.Context, req *protodef.MiddlewareRequest) (*protodef.MiddlewareResponse, error)
- func (m *GRPCPlugin) PluginName(ctx context.Context, req *protodef.Empty) (*protodef.PluginNameResponse, error)
- func (m *GRPCPlugin) PluginVersion(ctx context.Context, req *protodef.Empty) (*protodef.PluginVersionResponse, error)
- func (m *GRPCPlugin) Routes(ctx context.Context, req *protodef.Empty) (*protodef.Empty, error)
- func (m *GRPCPlugin) Settings(ctx context.Context, req *protodef.Empty) (*protodef.SettingsResponse, error)
- type GRPCRendererPlugin
- func (l *GRPCRendererPlugin) Error(w http.ResponseWriter, r *http.Request, content string, statusCode int, ...) (err error)
- func (l *GRPCRendererPlugin) Page(w http.ResponseWriter, r *http.Request, assets ambient.FileSystemReader, ...) (err error)
- func (l *GRPCRendererPlugin) PageContent(w http.ResponseWriter, r *http.Request, content string, ...) (err error)
- func (l *GRPCRendererPlugin) Post(w http.ResponseWriter, r *http.Request, assets ambient.FileSystemReader, ...) (err error)
- func (l *GRPCRendererPlugin) PostContent(w http.ResponseWriter, r *http.Request, content string, ...) (err error)
- type GRPCRendererServer
- func (m *GRPCRendererServer) Error(ctx context.Context, req *protodef.RendererErrorRequest) (resp *protodef.Empty, err error)
- func (m *GRPCRendererServer) Page(ctx context.Context, req *protodef.RendererPageRequest) (resp *protodef.Empty, err error)
- func (m *GRPCRendererServer) PageContent(ctx context.Context, req *protodef.RendererPageContentRequest) (resp *protodef.Empty, err error)
- func (m *GRPCRendererServer) Post(ctx context.Context, req *protodef.RendererPostRequest) (resp *protodef.Empty, err error)
- func (m *GRPCRendererServer) PostContent(ctx context.Context, req *protodef.RendererPostContentRequest) (resp *protodef.Empty, err error)
- type GRPCRouterPlugin
- func (c *GRPCRouterPlugin) Delete(path string, fn func(http.ResponseWriter, *http.Request) (err error))
- func (c *GRPCRouterPlugin) Error(status int, w http.ResponseWriter, r *http.Request)
- func (c *GRPCRouterPlugin) Get(path string, fn func(http.ResponseWriter, *http.Request) (err error))
- func (c *GRPCRouterPlugin) Handle(method string, path string, ...)
- func (c *GRPCRouterPlugin) Head(path string, fn func(http.ResponseWriter, *http.Request) (err error))
- func (c *GRPCRouterPlugin) Options(path string, fn func(http.ResponseWriter, *http.Request) (err error))
- func (c *GRPCRouterPlugin) Param(r *http.Request, name string) string
- func (c *GRPCRouterPlugin) Patch(path string, fn func(http.ResponseWriter, *http.Request) (err error))
- func (c *GRPCRouterPlugin) Post(path string, fn func(http.ResponseWriter, *http.Request) (err error))
- func (c *GRPCRouterPlugin) Put(path string, fn func(http.ResponseWriter, *http.Request) (err error))
- func (c *GRPCRouterPlugin) StatusError(status int, err error) error
- func (c *GRPCRouterPlugin) Wrap(handler http.HandlerFunc) func(w http.ResponseWriter, r *http.Request) (err error)
- type GRPCServer
- func (m *GRPCServer) Assets() ([]ambient.Asset, ambient.FileSystemReader)
- func (m *GRPCServer) Disable() error
- func (m *GRPCServer) Enable(toolkit *ambient.Toolkit) error
- func (m *GRPCServer) FuncMap() func(r *http.Request) template.FuncMap
- func (m *GRPCServer) GrantRequests() []ambient.GrantRequest
- func (m *GRPCServer) Middleware() []func(next http.Handler) http.Handler
- func (m *GRPCServer) PluginName() string
- func (m *GRPCServer) PluginVersion() string
- func (m *GRPCServer) Routes()
- func (m *GRPCServer) Settings() []ambient.Setting
- type GRPCSitePlugin
- func (c *GRPCSitePlugin) AuthenticatedUser(r *http.Request) (string, error)
- func (c *GRPCSitePlugin) Authorized(grant ambient.Grant) bool
- func (c *GRPCSitePlugin) CSRF(r *http.Request, token string) bool
- func (c *GRPCSitePlugin) Content() (string, error)
- func (c *GRPCSitePlugin) DeletePlugin(pluginName string) error
- func (c *GRPCSitePlugin) DeletePostByID(ID string) error
- func (c *GRPCSitePlugin) DeleteSessionValue(r *http.Request, name string)
- func (c *GRPCSitePlugin) DisablePlugin(pluginName string, unloadPlugin bool) error
- func (c *GRPCSitePlugin) EnablePlugin(pluginName string, loadPlugin bool) error
- func (c *GRPCSitePlugin) Error(siteError error) error
- func (c *GRPCSitePlugin) FullURL() (string, error)
- func (c *GRPCSitePlugin) Load() error
- func (c *GRPCSitePlugin) LoadSinglePluginPages(name string)
- func (c *GRPCSitePlugin) LogoutAllUsers(r *http.Request) error
- func (c *GRPCSitePlugin) NeighborPluginGrantList(pluginName string) ([]ambient.GrantRequest, error)
- func (c *GRPCSitePlugin) NeighborPluginGranted(pluginName string, grantName ambient.Grant) (bool, error)
- func (c *GRPCSitePlugin) NeighborPluginGrants(pluginName string) (map[ambient.Grant]bool, error)
- func (c *GRPCSitePlugin) NeighborPluginRequestedGrant(pluginName string, grantName ambient.Grant) (bool, error)
- func (c *GRPCSitePlugin) NeighborPluginSetting(pluginName string, fieldName string) (interface{}, error)
- func (c *GRPCSitePlugin) NeighborPluginSettingString(pluginName string, fieldName string) (string, error)
- func (c *GRPCSitePlugin) PluginNames() ([]string, error)
- func (c *GRPCSitePlugin) PluginNeighborRoutesList(pluginName string) ([]ambient.Route, error)
- func (c *GRPCSitePlugin) PluginNeighborSettingsList(pluginName string) ([]ambient.Setting, error)
- func (c *GRPCSitePlugin) PluginSetting(fieldName string) (interface{}, error)
- func (c *GRPCSitePlugin) PluginSettingBool(fieldName string) (bool, error)
- func (c *GRPCSitePlugin) PluginSettingString(fieldName string) (string, error)
- func (c *GRPCSitePlugin) PluginTrusted(pluginName string) (bool, error)
- func (c *GRPCSitePlugin) Plugins() (map[string]ambient.PluginData, error)
- func (c *GRPCSitePlugin) PostByID(ID string) (ambient.Post, error)
- func (c *GRPCSitePlugin) PostBySlug(slug string) (ambient.PostWithID, error)
- func (c *GRPCSitePlugin) PostsAndPages(onlyPublished bool) (ambient.PostWithIDList, error)
- func (c *GRPCSitePlugin) PublishedPages() ([]ambient.Post, error)
- func (c *GRPCSitePlugin) PublishedPosts() ([]ambient.Post, error)
- func (c *GRPCSitePlugin) SavePost(ID string, post ambient.Post) error
- func (c *GRPCSitePlugin) Scheme() (string, error)
- func (c *GRPCSitePlugin) SessionValue(r *http.Request, name string) string
- func (c *GRPCSitePlugin) SetCSRF(r *http.Request) string
- func (c *GRPCSitePlugin) SetContent(content string) error
- func (c *GRPCSitePlugin) SetNeighborPluginGrant(pluginName string, grantName ambient.Grant, granted bool) error
- func (c *GRPCSitePlugin) SetNeighborPluginSetting(pluginName string, settingName string, settingValue string) error
- func (c *GRPCSitePlugin) SetPluginSetting(settingName string, value string) error
- func (c *GRPCSitePlugin) SetScheme(scheme string) error
- func (c *GRPCSitePlugin) SetSessionValue(r *http.Request, name string, value string) error
- func (c *GRPCSitePlugin) SetTitle(title string) error
- func (c *GRPCSitePlugin) SetURL(URL string) error
- func (c *GRPCSitePlugin) Tags(onlyPublished bool) (ambient.TagList, error)
- func (c *GRPCSitePlugin) Title() (string, error)
- func (c *GRPCSitePlugin) URL() (string, error)
- func (c *GRPCSitePlugin) Updated() (time.Time, error)
- func (c *GRPCSitePlugin) UserLogin(r *http.Request, username string) error
- func (c *GRPCSitePlugin) UserLogout(r *http.Request) error
- func (c *GRPCSitePlugin) UserPersist(r *http.Request, persist bool) error
- type GRPCSiteServer
- func (m *GRPCSiteServer) AuthenticatedUser(ctx context.Context, req *protodef.SiteAuthenticatedUserRequest) (resp *protodef.SiteAuthenticatedUserResponse, err error)
- func (m *GRPCSiteServer) Authorized(ctx context.Context, req *protodef.SiteAuthorizedRequest) (resp *protodef.SiteAuthorizedResponse, err error)
- func (m *GRPCSiteServer) CSRF(ctx context.Context, req *protodef.SiteCSRFRequest) (resp *protodef.SiteCSRFResponse, err error)
- func (m *GRPCSiteServer) Content(ctx context.Context, req *protodef.Empty) (resp *protodef.SiteContentResponse, err error)
- func (m *GRPCSiteServer) DeletePlugin(ctx context.Context, req *protodef.SiteDeletePluginRequest) (resp *protodef.Empty, err error)
- func (m *GRPCSiteServer) DeletePostByID(ctx context.Context, req *protodef.SiteDeletePostByIDRequest) (resp *protodef.Empty, err error)
- func (m *GRPCSiteServer) DeleteSessionValue(ctx context.Context, req *protodef.SiteDeleteSessionValueRequest) (resp *protodef.Empty, err error)
- func (m *GRPCSiteServer) DisablePlugin(ctx context.Context, req *protodef.SiteDisablePluginRequest) (resp *protodef.Empty, err error)
- func (m *GRPCSiteServer) EnablePlugin(ctx context.Context, req *protodef.SiteEnablePluginRequest) (resp *protodef.Empty, err error)
- func (m *GRPCSiteServer) FullURL(ctx context.Context, req *protodef.Empty) (resp *protodef.SiteFullURLResponse, err error)
- func (m *GRPCSiteServer) Load(ctx context.Context, req *protodef.Empty) (resp *protodef.Empty, err error)
- func (m *GRPCSiteServer) LoadSinglePluginPages(ctx context.Context, req *protodef.SiteLoadSinglePluginPagesRequest) (resp *protodef.Empty, err error)
- func (m *GRPCSiteServer) LogoutAllUsers(ctx context.Context, req *protodef.SiteLogoutAllUsersRequest) (resp *protodef.Empty, err error)
- func (m *GRPCSiteServer) NeighborPluginGrantList(ctx context.Context, req *protodef.SiteNeighborPluginGrantListRequest) (resp *protodef.SiteNeighborPluginGrantListResponse, err error)
- func (m *GRPCSiteServer) NeighborPluginGranted(ctx context.Context, req *protodef.SiteNeighborPluginGrantedRequest) (resp *protodef.SiteNeighborPluginGrantedResponse, err error)
- func (m *GRPCSiteServer) NeighborPluginGrants(ctx context.Context, req *protodef.SiteNeighborPluginGrantsRequest) (resp *protodef.SiteNeighborPluginGrantsResponse, err error)
- func (m *GRPCSiteServer) NeighborPluginRequestedGrant(ctx context.Context, req *protodef.SiteNeighborPluginRequestedGrantRequest) (resp *protodef.SiteNeighborPluginRequestedGrantResponse, err error)
- func (m *GRPCSiteServer) NeighborPluginSetting(ctx context.Context, req *protodef.SiteNeighborPluginSettingRequest) (resp *protodef.SiteNeighborPluginSettingResponse, err error)
- func (m *GRPCSiteServer) NeighborPluginSettingString(ctx context.Context, req *protodef.SiteNeighborPluginSettingStringRequest) (resp *protodef.SiteNeighborPluginSettingStringResponse, err error)
- func (m *GRPCSiteServer) PluginNames(ctx context.Context, req *protodef.Empty) (resp *protodef.SitePluginNamesResponse, err error)
- func (m *GRPCSiteServer) PluginNeighborRoutesList(ctx context.Context, req *protodef.SitePluginNeighborRoutesListRequest) (resp *protodef.SitePluginNeighborRoutesListResponse, err error)
- func (m *GRPCSiteServer) PluginNeighborSettingsList(ctx context.Context, req *protodef.SitePluginNeighborSettingsListRequest) (resp *protodef.SitePluginNeighborSettingsListResponse, err error)
- func (m *GRPCSiteServer) PluginSetting(ctx context.Context, req *protodef.SitePluginSettingRequest) (resp *protodef.SitePluginSettingResponse, err error)
- func (m *GRPCSiteServer) PluginSettingBool(ctx context.Context, req *protodef.SitePluginSettingBoolRequest) (resp *protodef.SitePluginSettingBoolResponse, err error)
- func (m *GRPCSiteServer) PluginSettingString(ctx context.Context, req *protodef.SitePluginSettingStringRequest) (resp *protodef.SitePluginSettingStringResponse, err error)
- func (m *GRPCSiteServer) PluginTrusted(ctx context.Context, req *protodef.SitePluginTrustedRequest) (resp *protodef.SitePluginTrustedResponse, err error)
- func (m *GRPCSiteServer) Plugins(ctx context.Context, req *protodef.Empty) (resp *protodef.SitePluginsResponse, err error)
- func (m *GRPCSiteServer) PostByID(ctx context.Context, req *protodef.SitePostByIDRequest) (resp *protodef.SitePostByIDResponse, err error)
- func (m *GRPCSiteServer) PostBySlug(ctx context.Context, req *protodef.SitePostBySlugRequest) (resp *protodef.SitePostBySlugResponse, err error)
- func (m *GRPCSiteServer) PostsAndPages(ctx context.Context, req *protodef.SitePostsAndPagesRequest) (resp *protodef.SitePostsAndPagesResponse, err error)
- func (m *GRPCSiteServer) PublishedPages(ctx context.Context, req *protodef.Empty) (resp *protodef.SitePublishedPagesResponse, err error)
- func (m *GRPCSiteServer) PublishedPosts(ctx context.Context, req *protodef.Empty) (resp *protodef.SitePublishedPostsResponse, err error)
- func (m *GRPCSiteServer) SavePost(ctx context.Context, req *protodef.SiteSavePostRequest) (resp *protodef.Empty, err error)
- func (m *GRPCSiteServer) Scheme(ctx context.Context, req *protodef.Empty) (resp *protodef.SiteSchemeResponse, err error)
- func (m *GRPCSiteServer) SessionValue(ctx context.Context, req *protodef.SiteSessionValueRequest) (resp *protodef.SiteSessionValueResponse, err error)
- func (m *GRPCSiteServer) SetCSRF(ctx context.Context, req *protodef.SiteSetCSRFRequest) (resp *protodef.SiteSetCSRFResponse, err error)
- func (m *GRPCSiteServer) SetContent(ctx context.Context, req *protodef.SiteSetContentRequest) (resp *protodef.Empty, err error)
- func (m *GRPCSiteServer) SetNeighborPluginGrant(ctx context.Context, req *protodef.SiteSetNeighborPluginGrantRequest) (resp *protodef.Empty, err error)
- func (m *GRPCSiteServer) SetNeighborPluginSetting(ctx context.Context, req *protodef.SiteSetNeighborPluginSettingRequest) (resp *protodef.Empty, err error)
- func (m *GRPCSiteServer) SetPluginSetting(ctx context.Context, req *protodef.SiteSetPluginSettingRequest) (resp *protodef.Empty, err error)
- func (m *GRPCSiteServer) SetScheme(ctx context.Context, req *protodef.SiteSetSchemeRequest) (resp *protodef.Empty, err error)
- func (m *GRPCSiteServer) SetSessionValue(ctx context.Context, req *protodef.SiteSetSessionValueRequest) (resp *protodef.Empty, err error)
- func (m *GRPCSiteServer) SetTitle(ctx context.Context, req *protodef.SiteSetTitleRequest) (resp *protodef.Empty, err error)
- func (m *GRPCSiteServer) SetURL(ctx context.Context, req *protodef.SiteSetURLRequest) (resp *protodef.Empty, err error)
- func (m *GRPCSiteServer) Tags(ctx context.Context, req *protodef.SiteTagsRequest) (resp *protodef.SiteTagsResponse, err error)
- func (m *GRPCSiteServer) Title(ctx context.Context, req *protodef.Empty) (resp *protodef.SiteTitleResponse, err error)
- func (m *GRPCSiteServer) URL(ctx context.Context, req *protodef.Empty) (resp *protodef.SiteURLResponse, err error)
- func (m *GRPCSiteServer) Updated(ctx context.Context, req *protodef.Empty) (resp *protodef.SiteUpdatedResponse, err error)
- func (m *GRPCSiteServer) UserLogin(ctx context.Context, req *protodef.SiteUserLoginRequest) (resp *protodef.Empty, err error)
- func (m *GRPCSiteServer) UserLogout(ctx context.Context, req *protodef.SiteUserLogoutRequest) (resp *protodef.Empty, err error)
- func (m *GRPCSiteServer) UserPersist(ctx context.Context, req *protodef.SiteUserPersistRequest) (resp *protodef.Empty, err error)
- type GenericPlugin
- type Handler
- type HandlerImpl
- type MockHandler
- type ResponseWriter
Constants ¶
This section is empty.
Variables ¶
var Handshake = plugin.HandshakeConfig{
ProtocolVersion: 1,
MagicCookieKey: "AMBIENT_PLUGIN",
MagicCookieValue: "v1.0",
}
Handshake is a common handshake that is shared by plugin and host.
Functions ¶
func ArrayToProtobufStruct ¶
ArrayToProtobufStruct converts an array to a protobuf struct.
func ConnectPlugin ¶
func ConnectPlugin(logger ambient.AppLogger, pluginName string, pluginPath string) (ambient.Plugin, *plugin.Client, plugin.ClientProtocol, error)
ConnectPlugin will connect to a plugin over gRPC.
func ErrorHandler ¶
ErrorHandler returns a gRPC error if a gRPC problem or a regular error if not a gRPC error.
func InterfaceToProtobufAny ¶
InterfaceToProtobufAny converts an interface to a protobuf any.
func MapToProtobufStruct ¶
MapToProtobufStruct converts a map to a protobuf struct.
func ObjectToProtobufStruct ¶
ObjectToProtobufStruct converts an object to a protobuf struct.
func ProtobufAnyToInterface ¶
ProtobufAnyToInterface converts a protobuf any to an interface.
func ProtobufStructToArray ¶
ProtobufStructToArray converts a protobuf struct to an array.
func ProtobufStructToMap ¶
ProtobufStructToMap converts a map to a protobuf struct.
func ProtobufStructToObject ¶
ProtobufStructToObject converts a protobuf struct to an object.
Types ¶
type FuncMapper ¶
type FuncMapper interface {
Do(globalFuncMap bool, requestID string, key string, args []interface{}, method string, path string, headers http.Header, body []byte) (value interface{}, errText string, err error)
}
FuncMapper handler.
type FuncMapperImpl ¶
type FuncMapperImpl struct { Log ambient.Logger Impl ambient.MiddlewarePlugin PluginState *grpcsafe.PluginState }
FuncMapperImpl handles the FuncMap logic.
type GRPCAddRouterServer ¶
type GRPCAddRouterServer struct { Impl ambient.Router Log ambient.Logger HandlerClient *GRPCHandlerServer // contains filtered or unexported fields }
GRPCAddRouterServer is the gRPC server that GRPCClient talks to.
func (*GRPCAddRouterServer) Delete ¶
func (m *GRPCAddRouterServer) Delete(ctx context.Context, req *protodef.RouterRequest) (resp *protodef.Empty, err error)
Delete request handler.
func (*GRPCAddRouterServer) Error ¶
func (m *GRPCAddRouterServer) Error(ctx context.Context, req *protodef.RouterErrorRequest) (resp *protodef.Empty, err error)
Delete request handler.
func (*GRPCAddRouterServer) Get ¶
func (m *GRPCAddRouterServer) Get(ctx context.Context, req *protodef.RouterRequest) (resp *protodef.Empty, err error)
Get request handler.
func (*GRPCAddRouterServer) Handle ¶
func (m *GRPCAddRouterServer) Handle(ctx context.Context, req *protodef.RouterRequest) (resp *protodef.Empty, err error)
Handle request handler.
func (*GRPCAddRouterServer) Head ¶
func (m *GRPCAddRouterServer) Head(ctx context.Context, req *protodef.RouterRequest) (resp *protodef.Empty, err error)
Head request handler.
func (*GRPCAddRouterServer) Options ¶
func (m *GRPCAddRouterServer) Options(ctx context.Context, req *protodef.RouterRequest) (resp *protodef.Empty, err error)
Options request handler.
func (*GRPCAddRouterServer) Param ¶
func (m *GRPCAddRouterServer) Param(ctx context.Context, req *protodef.RouterParamRequest) (resp *protodef.RouterParamResponse, err error)
Param returns the named parameters.
func (*GRPCAddRouterServer) Patch ¶
func (m *GRPCAddRouterServer) Patch(ctx context.Context, req *protodef.RouterRequest) (resp *protodef.Empty, err error)
Patch request handler.
func (*GRPCAddRouterServer) Post ¶
func (m *GRPCAddRouterServer) Post(ctx context.Context, req *protodef.RouterRequest) (resp *protodef.Empty, err error)
Post request handler.
func (*GRPCAddRouterServer) Put ¶
func (m *GRPCAddRouterServer) Put(ctx context.Context, req *protodef.RouterRequest) (resp *protodef.Empty, err error)
Put request handler.
type GRPCFuncMapperPlugin ¶
type GRPCFuncMapperPlugin struct { Impl FuncMapper Log ambient.Logger }
GRPCFuncMapperPlugin is the gRPC server that GRPCClient talks to.
func (*GRPCFuncMapperPlugin) Do ¶
func (m *GRPCFuncMapperPlugin) Do(ctx context.Context, req *protodef.FuncMapperDoRequest) (resp *protodef.FuncMapperDoResponse, err error)
Do handler.
type GRPCFuncMapperServer ¶
GRPCFuncMapperServer handles server calls for FuncMap.
type GRPCHandlerPlugin ¶
GRPCHandlerPlugin is the gRPC server that GRPCClient talks to.
func (*GRPCHandlerPlugin) Handle ¶
func (m *GRPCHandlerPlugin) Handle(ctx context.Context, req *protodef.HandleRequest) (resp *protodef.HandleResponse, err error)
Handle .
type GRPCHandlerServer ¶
type GRPCHandlerServer struct {
// contains filtered or unexported fields
}
GRPCHandlerServer .
type GRPCLoggerPlugin ¶
type GRPCLoggerPlugin struct {
// contains filtered or unexported fields
}
GRPCLoggerPlugin .
func (*GRPCLoggerPlugin) Debug ¶
func (l *GRPCLoggerPlugin) Debug(format string, v ...interface{})
Debug handler.
func (*GRPCLoggerPlugin) Error ¶
func (l *GRPCLoggerPlugin) Error(format string, v ...interface{})
Error handler.
func (*GRPCLoggerPlugin) Info ¶
func (l *GRPCLoggerPlugin) Info(format string, v ...interface{})
Info handler.
func (*GRPCLoggerPlugin) Log ¶
func (l *GRPCLoggerPlugin) Log(level ambient.LogLevel, format string, v ...interface{})
Log handler.
func (*GRPCLoggerPlugin) Warn ¶
func (l *GRPCLoggerPlugin) Warn(format string, v ...interface{})
Warn handler.
type GRPCLoggerServer ¶
GRPCLoggerServer is the gRPC server that GRPCClient talks to.
func (*GRPCLoggerServer) Debug ¶
func (m *GRPCLoggerServer) Debug(ctx context.Context, req *protodef.LogFormat) (resp *protodef.Empty, err error)
Debug -
func (*GRPCLoggerServer) Error ¶
func (m *GRPCLoggerServer) Error(ctx context.Context, req *protodef.LogFormat) (resp *protodef.Empty, err error)
Error -
type GRPCPlugin ¶
type GRPCPlugin struct { Impl ambient.MiddlewarePlugin // contains filtered or unexported fields }
GRPCPlugin is the plugin side implementation.
func (*GRPCPlugin) Assets ¶
func (m *GRPCPlugin) Assets(ctx context.Context, req *protodef.Empty) (*protodef.AssetsResponse, error)
Assets handler.
func (*GRPCPlugin) Enable ¶
func (m *GRPCPlugin) Enable(ctx context.Context, req *protodef.Toolkit) (*protodef.EnableResponse, error)
Enable handler.
func (*GRPCPlugin) FuncMap ¶
func (m *GRPCPlugin) FuncMap(ctx context.Context, req *protodef.Empty) (*protodef.FuncMapResponse, error)
FuncMap handler.
func (*GRPCPlugin) GrantRequests ¶
func (m *GRPCPlugin) GrantRequests(ctx context.Context, req *protodef.Empty) (*protodef.GrantRequestsResponse, error)
GrantRequests handler.
func (*GRPCPlugin) Middleware ¶
func (m *GRPCPlugin) Middleware(ctx context.Context, req *protodef.MiddlewareRequest) (*protodef.MiddlewareResponse, error)
Middleware handler.
func (*GRPCPlugin) PluginName ¶
func (m *GRPCPlugin) PluginName(ctx context.Context, req *protodef.Empty) (*protodef.PluginNameResponse, error)
PluginName handler.
func (*GRPCPlugin) PluginVersion ¶
func (m *GRPCPlugin) PluginVersion(ctx context.Context, req *protodef.Empty) (*protodef.PluginVersionResponse, error)
PluginVersion handler.
func (*GRPCPlugin) Settings ¶
func (m *GRPCPlugin) Settings(ctx context.Context, req *protodef.Empty) (*protodef.SettingsResponse, error)
Settings handler.
type GRPCRendererPlugin ¶
type GRPCRendererPlugin struct { Log ambient.Logger PluginState *grpcsafe.PluginState // contains filtered or unexported fields }
GRPCRendererPlugin .
func (*GRPCRendererPlugin) Error ¶
func (l *GRPCRendererPlugin) Error(w http.ResponseWriter, r *http.Request, content string, statusCode int, fm func(r *http.Request) template.FuncMap, vars map[string]interface{}) (err error)
Error handler.
func (*GRPCRendererPlugin) Page ¶
func (l *GRPCRendererPlugin) Page(w http.ResponseWriter, r *http.Request, assets ambient.FileSystemReader, templateName string, fm func(r *http.Request) template.FuncMap, vars map[string]interface{}) (err error)
Page handler.
func (*GRPCRendererPlugin) PageContent ¶
func (l *GRPCRendererPlugin) PageContent(w http.ResponseWriter, r *http.Request, content string, fm func(r *http.Request) template.FuncMap, vars map[string]interface{}) (err error)
PageContent handler.
func (*GRPCRendererPlugin) Post ¶
func (l *GRPCRendererPlugin) Post(w http.ResponseWriter, r *http.Request, assets ambient.FileSystemReader, templateName string, fm func(r *http.Request) template.FuncMap, vars map[string]interface{}) (err error)
Post handler.
func (*GRPCRendererPlugin) PostContent ¶
func (l *GRPCRendererPlugin) PostContent(w http.ResponseWriter, r *http.Request, content string, fm func(r *http.Request) template.FuncMap, vars map[string]interface{}) (err error)
PostContent handler.
type GRPCRendererServer ¶
type GRPCRendererServer struct { Log ambient.Logger Impl ambient.Renderer FuncMapperClient *GRPCFuncMapperServer // contains filtered or unexported fields }
GRPCRendererServer is the gRPC server that GRPCClient talks to.
func (*GRPCRendererServer) Error ¶
func (m *GRPCRendererServer) Error(ctx context.Context, req *protodef.RendererErrorRequest) (resp *protodef.Empty, err error)
Error handler.
func (*GRPCRendererServer) Page ¶
func (m *GRPCRendererServer) Page(ctx context.Context, req *protodef.RendererPageRequest) (resp *protodef.Empty, err error)
Page handler.
func (*GRPCRendererServer) PageContent ¶
func (m *GRPCRendererServer) PageContent(ctx context.Context, req *protodef.RendererPageContentRequest) (resp *protodef.Empty, err error)
PageContent handler.
func (*GRPCRendererServer) Post ¶
func (m *GRPCRendererServer) Post(ctx context.Context, req *protodef.RendererPostRequest) (resp *protodef.Empty, err error)
Post handler.
func (*GRPCRendererServer) PostContent ¶
func (m *GRPCRendererServer) PostContent(ctx context.Context, req *protodef.RendererPostContentRequest) (resp *protodef.Empty, err error)
PostContent handler.
type GRPCRouterPlugin ¶
type GRPCRouterPlugin struct { Log ambient.Logger PluginState *grpcsafe.PluginState // contains filtered or unexported fields }
GRPCRouterPlugin .
func (*GRPCRouterPlugin) Delete ¶
func (c *GRPCRouterPlugin) Delete(path string, fn func(http.ResponseWriter, *http.Request) (err error))
Delete request handler.
func (*GRPCRouterPlugin) Error ¶
func (c *GRPCRouterPlugin) Error(status int, w http.ResponseWriter, r *http.Request)
Error handler.
func (*GRPCRouterPlugin) Get ¶
func (c *GRPCRouterPlugin) Get(path string, fn func(http.ResponseWriter, *http.Request) (err error))
Get request handler.
func (*GRPCRouterPlugin) Handle ¶
func (c *GRPCRouterPlugin) Handle(method string, path string, fn func(http.ResponseWriter, *http.Request) (err error))
Handle request handler.
func (*GRPCRouterPlugin) Head ¶
func (c *GRPCRouterPlugin) Head(path string, fn func(http.ResponseWriter, *http.Request) (err error))
Head request handler.
func (*GRPCRouterPlugin) Options ¶
func (c *GRPCRouterPlugin) Options(path string, fn func(http.ResponseWriter, *http.Request) (err error))
Options request handler.
func (*GRPCRouterPlugin) Param ¶
func (c *GRPCRouterPlugin) Param(r *http.Request, name string) string
Param request handler.
func (*GRPCRouterPlugin) Patch ¶
func (c *GRPCRouterPlugin) Patch(path string, fn func(http.ResponseWriter, *http.Request) (err error))
Patch request handler.
func (*GRPCRouterPlugin) Post ¶
func (c *GRPCRouterPlugin) Post(path string, fn func(http.ResponseWriter, *http.Request) (err error))
Post request handler.
func (*GRPCRouterPlugin) Put ¶
func (c *GRPCRouterPlugin) Put(path string, fn func(http.ResponseWriter, *http.Request) (err error))
Put request handler.
func (*GRPCRouterPlugin) StatusError ¶
func (c *GRPCRouterPlugin) StatusError(status int, err error) error
StatusError handler.
func (*GRPCRouterPlugin) Wrap ¶
func (c *GRPCRouterPlugin) Wrap(handler http.HandlerFunc) func(w http.ResponseWriter, r *http.Request) (err error)
Wrap for http.HandlerFunc.
type GRPCServer ¶
type GRPCServer struct {
// contains filtered or unexported fields
}
GRPCServer is the server side implementation.
func (*GRPCServer) Assets ¶
func (m *GRPCServer) Assets() ([]ambient.Asset, ambient.FileSystemReader)
Assets handler.
func (*GRPCServer) Enable ¶
func (m *GRPCServer) Enable(toolkit *ambient.Toolkit) error
Enable handler.
func (*GRPCServer) FuncMap ¶
func (m *GRPCServer) FuncMap() func(r *http.Request) template.FuncMap
FuncMap handler.
func (*GRPCServer) GrantRequests ¶
func (m *GRPCServer) GrantRequests() []ambient.GrantRequest
GrantRequests handler.
func (*GRPCServer) Middleware ¶
func (m *GRPCServer) Middleware() []func(next http.Handler) http.Handler
Middleware handler.
func (*GRPCServer) PluginVersion ¶
func (m *GRPCServer) PluginVersion() string
PluginVersion handler.
type GRPCSitePlugin ¶
GRPCSitePlugin is the plugin side implementation of secure site.
func (*GRPCSitePlugin) AuthenticatedUser ¶
func (c *GRPCSitePlugin) AuthenticatedUser(r *http.Request) (string, error)
AuthenticatedUser handler.
func (*GRPCSitePlugin) Authorized ¶
func (c *GRPCSitePlugin) Authorized(grant ambient.Grant) bool
Authorized handler.
func (*GRPCSitePlugin) CSRF ¶
func (c *GRPCSitePlugin) CSRF(r *http.Request, token string) bool
CSRF handler.
func (*GRPCSitePlugin) Content ¶
func (c *GRPCSitePlugin) Content() (string, error)
Content handler.
func (*GRPCSitePlugin) DeletePlugin ¶
func (c *GRPCSitePlugin) DeletePlugin(pluginName string) error
DeletePlugin handler.
func (*GRPCSitePlugin) DeletePostByID ¶
func (c *GRPCSitePlugin) DeletePostByID(ID string) error
DeletePostByID handler.
func (*GRPCSitePlugin) DeleteSessionValue ¶
func (c *GRPCSitePlugin) DeleteSessionValue(r *http.Request, name string)
DeleteSessionValue handler.
func (*GRPCSitePlugin) DisablePlugin ¶
func (c *GRPCSitePlugin) DisablePlugin(pluginName string, unloadPlugin bool) error
DisablePlugin handler.
func (*GRPCSitePlugin) EnablePlugin ¶
func (c *GRPCSitePlugin) EnablePlugin(pluginName string, loadPlugin bool) error
EnablePlugin handler.
func (*GRPCSitePlugin) FullURL ¶
func (c *GRPCSitePlugin) FullURL() (string, error)
FullURL handler.
func (*GRPCSitePlugin) LoadSinglePluginPages ¶
func (c *GRPCSitePlugin) LoadSinglePluginPages(name string)
LoadSinglePluginPages handler.
func (*GRPCSitePlugin) LogoutAllUsers ¶
func (c *GRPCSitePlugin) LogoutAllUsers(r *http.Request) error
LogoutAllUsers handler.
func (*GRPCSitePlugin) NeighborPluginGrantList ¶
func (c *GRPCSitePlugin) NeighborPluginGrantList(pluginName string) ([]ambient.GrantRequest, error)
NeighborPluginGrantList handler.
func (*GRPCSitePlugin) NeighborPluginGranted ¶
func (c *GRPCSitePlugin) NeighborPluginGranted(pluginName string, grantName ambient.Grant) (bool, error)
NeighborPluginGranted handler.
func (*GRPCSitePlugin) NeighborPluginGrants ¶
NeighborPluginGrants handler.
func (*GRPCSitePlugin) NeighborPluginRequestedGrant ¶
func (c *GRPCSitePlugin) NeighborPluginRequestedGrant(pluginName string, grantName ambient.Grant) (bool, error)
NeighborPluginRequestedGrant handler.
func (*GRPCSitePlugin) NeighborPluginSetting ¶
func (c *GRPCSitePlugin) NeighborPluginSetting(pluginName string, fieldName string) (interface{}, error)
NeighborPluginSetting handler.
func (*GRPCSitePlugin) NeighborPluginSettingString ¶
func (c *GRPCSitePlugin) NeighborPluginSettingString(pluginName string, fieldName string) (string, error)
NeighborPluginSettingString handler.
func (*GRPCSitePlugin) PluginNames ¶
func (c *GRPCSitePlugin) PluginNames() ([]string, error)
PluginNames handler.
func (*GRPCSitePlugin) PluginNeighborRoutesList ¶
func (c *GRPCSitePlugin) PluginNeighborRoutesList(pluginName string) ([]ambient.Route, error)
PluginNeighborRoutesList handler.
func (*GRPCSitePlugin) PluginNeighborSettingsList ¶
func (c *GRPCSitePlugin) PluginNeighborSettingsList(pluginName string) ([]ambient.Setting, error)
PluginNeighborSettingsList handler.
func (*GRPCSitePlugin) PluginSetting ¶
func (c *GRPCSitePlugin) PluginSetting(fieldName string) (interface{}, error)
PluginSetting handler.
func (*GRPCSitePlugin) PluginSettingBool ¶
func (c *GRPCSitePlugin) PluginSettingBool(fieldName string) (bool, error)
PluginSettingBool handler.
func (*GRPCSitePlugin) PluginSettingString ¶
func (c *GRPCSitePlugin) PluginSettingString(fieldName string) (string, error)
PluginSettingString handler.
func (*GRPCSitePlugin) PluginTrusted ¶
func (c *GRPCSitePlugin) PluginTrusted(pluginName string) (bool, error)
PluginTrusted handler.
func (*GRPCSitePlugin) Plugins ¶
func (c *GRPCSitePlugin) Plugins() (map[string]ambient.PluginData, error)
Plugins handler.
func (*GRPCSitePlugin) PostByID ¶
func (c *GRPCSitePlugin) PostByID(ID string) (ambient.Post, error)
PostByID handler.
func (*GRPCSitePlugin) PostBySlug ¶
func (c *GRPCSitePlugin) PostBySlug(slug string) (ambient.PostWithID, error)
PostBySlug handler.
func (*GRPCSitePlugin) PostsAndPages ¶
func (c *GRPCSitePlugin) PostsAndPages(onlyPublished bool) (ambient.PostWithIDList, error)
PostsAndPages handler.
func (*GRPCSitePlugin) PublishedPages ¶
func (c *GRPCSitePlugin) PublishedPages() ([]ambient.Post, error)
PublishedPages handler.
func (*GRPCSitePlugin) PublishedPosts ¶
func (c *GRPCSitePlugin) PublishedPosts() ([]ambient.Post, error)
PublishedPosts handler.
func (*GRPCSitePlugin) SavePost ¶
func (c *GRPCSitePlugin) SavePost(ID string, post ambient.Post) error
SavePost handler.
func (*GRPCSitePlugin) SessionValue ¶
func (c *GRPCSitePlugin) SessionValue(r *http.Request, name string) string
SessionValue handler.
func (*GRPCSitePlugin) SetCSRF ¶
func (c *GRPCSitePlugin) SetCSRF(r *http.Request) string
SetCSRF handler.
func (*GRPCSitePlugin) SetContent ¶
func (c *GRPCSitePlugin) SetContent(content string) error
SetContent handler.
func (*GRPCSitePlugin) SetNeighborPluginGrant ¶
func (c *GRPCSitePlugin) SetNeighborPluginGrant(pluginName string, grantName ambient.Grant, granted bool) error
SetNeighborPluginGrant handler.
func (*GRPCSitePlugin) SetNeighborPluginSetting ¶
func (c *GRPCSitePlugin) SetNeighborPluginSetting(pluginName string, settingName string, settingValue string) error
SetNeighborPluginSetting handler.
func (*GRPCSitePlugin) SetPluginSetting ¶
func (c *GRPCSitePlugin) SetPluginSetting(settingName string, value string) error
SetPluginSetting handler.
func (*GRPCSitePlugin) SetScheme ¶
func (c *GRPCSitePlugin) SetScheme(scheme string) error
SetScheme handler.
func (*GRPCSitePlugin) SetSessionValue ¶
SetSessionValue handler.
func (*GRPCSitePlugin) SetTitle ¶
func (c *GRPCSitePlugin) SetTitle(title string) error
SetTitle handler.
func (*GRPCSitePlugin) Tags ¶
func (c *GRPCSitePlugin) Tags(onlyPublished bool) (ambient.TagList, error)
Tags handler.
func (*GRPCSitePlugin) Updated ¶
func (c *GRPCSitePlugin) Updated() (time.Time, error)
Updated handler.
func (*GRPCSitePlugin) UserLogin ¶
func (c *GRPCSitePlugin) UserLogin(r *http.Request, username string) error
UserLogin handler.
func (*GRPCSitePlugin) UserLogout ¶
func (c *GRPCSitePlugin) UserLogout(r *http.Request) error
UserLogout handler.
func (*GRPCSitePlugin) UserPersist ¶
func (c *GRPCSitePlugin) UserPersist(r *http.Request, persist bool) error
UserPersist handler.
type GRPCSiteServer ¶
type GRPCSiteServer struct { Impl ambient.SecureSite Log ambient.Logger // contains filtered or unexported fields }
GRPCSiteServer is the server side implementation of secure site.
func (*GRPCSiteServer) AuthenticatedUser ¶
func (m *GRPCSiteServer) AuthenticatedUser(ctx context.Context, req *protodef.SiteAuthenticatedUserRequest) (resp *protodef.SiteAuthenticatedUserResponse, err error)
AuthenticatedUser handler.
func (*GRPCSiteServer) Authorized ¶
func (m *GRPCSiteServer) Authorized(ctx context.Context, req *protodef.SiteAuthorizedRequest) (resp *protodef.SiteAuthorizedResponse, err error)
Authorized handler.
func (*GRPCSiteServer) CSRF ¶
func (m *GRPCSiteServer) CSRF(ctx context.Context, req *protodef.SiteCSRFRequest) (resp *protodef.SiteCSRFResponse, err error)
CSRF handler.
func (*GRPCSiteServer) Content ¶
func (m *GRPCSiteServer) Content(ctx context.Context, req *protodef.Empty) (resp *protodef.SiteContentResponse, err error)
Content handler.
func (*GRPCSiteServer) DeletePlugin ¶
func (m *GRPCSiteServer) DeletePlugin(ctx context.Context, req *protodef.SiteDeletePluginRequest) ( resp *protodef.Empty, err error)
DeletePlugin handler.
func (*GRPCSiteServer) DeletePostByID ¶
func (m *GRPCSiteServer) DeletePostByID(ctx context.Context, req *protodef.SiteDeletePostByIDRequest) ( resp *protodef.Empty, err error)
DeletePostByID handler.
func (*GRPCSiteServer) DeleteSessionValue ¶
func (m *GRPCSiteServer) DeleteSessionValue(ctx context.Context, req *protodef.SiteDeleteSessionValueRequest) (resp *protodef.Empty, err error)
DeleteSessionValue handler.
func (*GRPCSiteServer) DisablePlugin ¶
func (m *GRPCSiteServer) DisablePlugin(ctx context.Context, req *protodef.SiteDisablePluginRequest) ( resp *protodef.Empty, err error)
DisablePlugin handler.
func (*GRPCSiteServer) EnablePlugin ¶
func (m *GRPCSiteServer) EnablePlugin(ctx context.Context, req *protodef.SiteEnablePluginRequest) ( resp *protodef.Empty, err error)
EnablePlugin handler.
func (*GRPCSiteServer) FullURL ¶
func (m *GRPCSiteServer) FullURL(ctx context.Context, req *protodef.Empty) (resp *protodef.SiteFullURLResponse, err error)
FullURL handler.
func (*GRPCSiteServer) Load ¶
func (m *GRPCSiteServer) Load(ctx context.Context, req *protodef.Empty) (resp *protodef.Empty, err error)
Load handler.
func (*GRPCSiteServer) LoadSinglePluginPages ¶
func (m *GRPCSiteServer) LoadSinglePluginPages(ctx context.Context, req *protodef.SiteLoadSinglePluginPagesRequest) (resp *protodef.Empty, err error)
LoadSinglePluginPages handler.
func (*GRPCSiteServer) LogoutAllUsers ¶
func (m *GRPCSiteServer) LogoutAllUsers(ctx context.Context, req *protodef.SiteLogoutAllUsersRequest) (resp *protodef.Empty, err error)
LogoutAllUsers handler.
func (*GRPCSiteServer) NeighborPluginGrantList ¶
func (m *GRPCSiteServer) NeighborPluginGrantList(ctx context.Context, req *protodef.SiteNeighborPluginGrantListRequest) ( resp *protodef.SiteNeighborPluginGrantListResponse, err error)
NeighborPluginGrantList handler.
func (*GRPCSiteServer) NeighborPluginGranted ¶
func (m *GRPCSiteServer) NeighborPluginGranted(ctx context.Context, req *protodef.SiteNeighborPluginGrantedRequest) ( resp *protodef.SiteNeighborPluginGrantedResponse, err error)
NeighborPluginGranted handler.
func (*GRPCSiteServer) NeighborPluginGrants ¶
func (m *GRPCSiteServer) NeighborPluginGrants(ctx context.Context, req *protodef.SiteNeighborPluginGrantsRequest) ( resp *protodef.SiteNeighborPluginGrantsResponse, err error)
NeighborPluginGrants handler.
func (*GRPCSiteServer) NeighborPluginRequestedGrant ¶
func (m *GRPCSiteServer) NeighborPluginRequestedGrant(ctx context.Context, req *protodef.SiteNeighborPluginRequestedGrantRequest) ( resp *protodef.SiteNeighborPluginRequestedGrantResponse, err error)
NeighborPluginRequestedGrant handler.
func (*GRPCSiteServer) NeighborPluginSetting ¶
func (m *GRPCSiteServer) NeighborPluginSetting(ctx context.Context, req *protodef.SiteNeighborPluginSettingRequest) (resp *protodef.SiteNeighborPluginSettingResponse, err error)
NeighborPluginSetting handler.
func (*GRPCSiteServer) NeighborPluginSettingString ¶
func (m *GRPCSiteServer) NeighborPluginSettingString(ctx context.Context, req *protodef.SiteNeighborPluginSettingStringRequest) (resp *protodef.SiteNeighborPluginSettingStringResponse, err error)
NeighborPluginSettingString handler.
func (*GRPCSiteServer) PluginNames ¶
func (m *GRPCSiteServer) PluginNames(ctx context.Context, req *protodef.Empty) ( resp *protodef.SitePluginNamesResponse, err error)
PluginNames handler.
func (*GRPCSiteServer) PluginNeighborRoutesList ¶
func (m *GRPCSiteServer) PluginNeighborRoutesList(ctx context.Context, req *protodef.SitePluginNeighborRoutesListRequest) ( resp *protodef.SitePluginNeighborRoutesListResponse, err error)
PluginNeighborRoutesList handler.
func (*GRPCSiteServer) PluginNeighborSettingsList ¶
func (m *GRPCSiteServer) PluginNeighborSettingsList(ctx context.Context, req *protodef.SitePluginNeighborSettingsListRequest) (resp *protodef.SitePluginNeighborSettingsListResponse, err error)
PluginNeighborSettingsList handler.
func (*GRPCSiteServer) PluginSetting ¶
func (m *GRPCSiteServer) PluginSetting(ctx context.Context, req *protodef.SitePluginSettingRequest) (resp *protodef.SitePluginSettingResponse, err error)
PluginSetting handler.
func (*GRPCSiteServer) PluginSettingBool ¶
func (m *GRPCSiteServer) PluginSettingBool(ctx context.Context, req *protodef.SitePluginSettingBoolRequest) (resp *protodef.SitePluginSettingBoolResponse, err error)
PluginSettingBool handler.
func (*GRPCSiteServer) PluginSettingString ¶
func (m *GRPCSiteServer) PluginSettingString(ctx context.Context, req *protodef.SitePluginSettingStringRequest) (resp *protodef.SitePluginSettingStringResponse, err error)
PluginSettingString handler.
func (*GRPCSiteServer) PluginTrusted ¶
func (m *GRPCSiteServer) PluginTrusted(ctx context.Context, req *protodef.SitePluginTrustedRequest) (resp *protodef.SitePluginTrustedResponse, err error)
PluginTrusted handler.
func (*GRPCSiteServer) Plugins ¶
func (m *GRPCSiteServer) Plugins(ctx context.Context, req *protodef.Empty) ( resp *protodef.SitePluginsResponse, err error)
Plugins handler.
func (*GRPCSiteServer) PostByID ¶
func (m *GRPCSiteServer) PostByID(ctx context.Context, req *protodef.SitePostByIDRequest) ( resp *protodef.SitePostByIDResponse, err error)
PostByID handler.
func (*GRPCSiteServer) PostBySlug ¶
func (m *GRPCSiteServer) PostBySlug(ctx context.Context, req *protodef.SitePostBySlugRequest) ( resp *protodef.SitePostBySlugResponse, err error)
PostBySlug handler.
func (*GRPCSiteServer) PostsAndPages ¶
func (m *GRPCSiteServer) PostsAndPages(ctx context.Context, req *protodef.SitePostsAndPagesRequest) ( resp *protodef.SitePostsAndPagesResponse, err error)
PostsAndPages handler.
func (*GRPCSiteServer) PublishedPages ¶
func (m *GRPCSiteServer) PublishedPages(ctx context.Context, req *protodef.Empty) ( resp *protodef.SitePublishedPagesResponse, err error)
PublishedPages handler.
func (*GRPCSiteServer) PublishedPosts ¶
func (m *GRPCSiteServer) PublishedPosts(ctx context.Context, req *protodef.Empty) ( resp *protodef.SitePublishedPostsResponse, err error)
PublishedPosts handler.
func (*GRPCSiteServer) SavePost ¶
func (m *GRPCSiteServer) SavePost(ctx context.Context, req *protodef.SiteSavePostRequest) ( resp *protodef.Empty, err error)
SavePost handler.
func (*GRPCSiteServer) Scheme ¶
func (m *GRPCSiteServer) Scheme(ctx context.Context, req *protodef.Empty) (resp *protodef.SiteSchemeResponse, err error)
Scheme handler.
func (*GRPCSiteServer) SessionValue ¶
func (m *GRPCSiteServer) SessionValue(ctx context.Context, req *protodef.SiteSessionValueRequest) (resp *protodef.SiteSessionValueResponse, err error)
SessionValue handler.
func (*GRPCSiteServer) SetCSRF ¶
func (m *GRPCSiteServer) SetCSRF(ctx context.Context, req *protodef.SiteSetCSRFRequest) (resp *protodef.SiteSetCSRFResponse, err error)
SetCSRF handler.
func (*GRPCSiteServer) SetContent ¶
func (m *GRPCSiteServer) SetContent(ctx context.Context, req *protodef.SiteSetContentRequest) (resp *protodef.Empty, err error)
SetContent handler.
func (*GRPCSiteServer) SetNeighborPluginGrant ¶
func (m *GRPCSiteServer) SetNeighborPluginGrant(ctx context.Context, req *protodef.SiteSetNeighborPluginGrantRequest) ( resp *protodef.Empty, err error)
SetNeighborPluginGrant handler.
func (*GRPCSiteServer) SetNeighborPluginSetting ¶
func (m *GRPCSiteServer) SetNeighborPluginSetting(ctx context.Context, req *protodef.SiteSetNeighborPluginSettingRequest) (resp *protodef.Empty, err error)
SetNeighborPluginSetting handler.
func (*GRPCSiteServer) SetPluginSetting ¶
func (m *GRPCSiteServer) SetPluginSetting(ctx context.Context, req *protodef.SiteSetPluginSettingRequest) (resp *protodef.Empty, err error)
SetPluginSetting handler.
func (*GRPCSiteServer) SetScheme ¶
func (m *GRPCSiteServer) SetScheme(ctx context.Context, req *protodef.SiteSetSchemeRequest) (resp *protodef.Empty, err error)
SetScheme handler.
func (*GRPCSiteServer) SetSessionValue ¶
func (m *GRPCSiteServer) SetSessionValue(ctx context.Context, req *protodef.SiteSetSessionValueRequest) (resp *protodef.Empty, err error)
SetSessionValue handler.
func (*GRPCSiteServer) SetTitle ¶
func (m *GRPCSiteServer) SetTitle(ctx context.Context, req *protodef.SiteSetTitleRequest) (resp *protodef.Empty, err error)
SetTitle handler.
func (*GRPCSiteServer) SetURL ¶
func (m *GRPCSiteServer) SetURL(ctx context.Context, req *protodef.SiteSetURLRequest) (resp *protodef.Empty, err error)
SetURL handler.
func (*GRPCSiteServer) Tags ¶
func (m *GRPCSiteServer) Tags(ctx context.Context, req *protodef.SiteTagsRequest) (resp *protodef.SiteTagsResponse, err error)
Tags handler.
func (*GRPCSiteServer) Title ¶
func (m *GRPCSiteServer) Title(ctx context.Context, req *protodef.Empty) (resp *protodef.SiteTitleResponse, err error)
Title handler.
func (*GRPCSiteServer) URL ¶
func (m *GRPCSiteServer) URL(ctx context.Context, req *protodef.Empty) (resp *protodef.SiteURLResponse, err error)
URL handler.
func (*GRPCSiteServer) Updated ¶
func (m *GRPCSiteServer) Updated(ctx context.Context, req *protodef.Empty) (resp *protodef.SiteUpdatedResponse, err error)
Updated handler.
func (*GRPCSiteServer) UserLogin ¶
func (m *GRPCSiteServer) UserLogin(ctx context.Context, req *protodef.SiteUserLoginRequest) (resp *protodef.Empty, err error)
UserLogin handler.
func (*GRPCSiteServer) UserLogout ¶
func (m *GRPCSiteServer) UserLogout(ctx context.Context, req *protodef.SiteUserLogoutRequest) (resp *protodef.Empty, err error)
UserLogout handler.
func (*GRPCSiteServer) UserPersist ¶
func (m *GRPCSiteServer) UserPersist(ctx context.Context, req *protodef.SiteUserPersistRequest) ( resp *protodef.Empty, err error)
UserPersist handler.
type GenericPlugin ¶
type GenericPlugin struct { plugin.NetRPCUnsupportedPlugin Impl ambient.MiddlewarePlugin }
GenericPlugin is the implementation of plugin. Plugin so we can serve/consume this. We also implement GRPCPlugin so that this plugin can be served over gRPC.
func (*GenericPlugin) GRPCClient ¶
func (p *GenericPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)
GRPCClient .
func (*GenericPlugin) GRPCServer ¶
func (p *GenericPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error
GRPCServer .
type Handler ¶
type Handler interface {
Handle(requestID string, method string, path string, fullPath string, headers http.Header, body []byte) (status int, errorText string, response string, outHeaders http.Header)
}
Handler .
type HandlerImpl ¶
type HandlerImpl struct { Log ambient.Logger PluginState *grpcsafe.PluginState }
HandlerImpl .
type MockHandler ¶
MockHandler is a mock mux.
func (*MockHandler) ServeHTTP ¶
func (h *MockHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP stores the requests.
type ResponseWriter ¶
type ResponseWriter struct {
// contains filtered or unexported fields
}
ResponseWriter .
func (*ResponseWriter) WriteHeader ¶
func (w *ResponseWriter) WriteHeader(statusCode int)
WriteHeader .
Source Files ¶
- connect.go
- conversion.go
- error.go
- interface.go
- plugin.go
- plugin_funcmapper.go
- plugin_funcmapper_impl.go
- plugin_handler.go
- plugin_handler_impl.go
- plugin_logger.go
- plugin_renderer.go
- plugin_router.go
- plugin_site.go
- responsewriter.go
- server.go
- server_funcmapper.go
- server_handler.go
- server_logger.go
- server_renderer.go
- server_router.go
- server_site.go