Documentation ¶
Index ¶
- func BuildIndexMetaFromMap(data map[string]interface{}) *pb.IndexMeta
- func GraphQLAuthCheck(p graphql.ResolveParams, flamedContext *fContext.FlamedContext) (clusterID uint64, namespace string, accessControl *pb.AccessControl, err error)
- type CORSOptions
- func (o *CORSOptions) CROSCheckAllowNext(writer http.ResponseWriter, request *http.Request) bool
- func (o *CORSOptions) Header(origin string) (headers map[string]string)
- func (o *CORSOptions) IsOriginAllowed(origin string) (allowed bool)
- func (o *CORSOptions) PreflightHeader(origin, rMethod, rHeaders string) (headers map[string]string)
- type ServerStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildIndexMetaFromMap ¶
func GraphQLAuthCheck ¶
func GraphQLAuthCheck(p graphql.ResolveParams, flamedContext *fContext.FlamedContext) (clusterID uint64, namespace string, accessControl *pb.AccessControl, err error)
Types ¶
type CORSOptions ¶
type CORSOptions struct { // If set, all origins are allowed. AllowAllOrigins bool // A list of allowed origins. Wild cards and FQDNs are supported. AllowOrigins []string // If set, allows to share auth credentials such as cookies. AllowCredentials bool // A list of allowed HTTP methods. AllowMethods []string // A list of allowed HTTP headers. AllowHeaders []string // A list of exposed HTTP headers. ExposeHeaders []string // Max age of the CORS headers. MaxAge time.Duration }
CORSOptions represents Access Control options.
func GetCORSOptions ¶
func GetCORSOptions() *CORSOptions
func (*CORSOptions) CROSCheckAllowNext ¶
func (o *CORSOptions) CROSCheckAllowNext(writer http.ResponseWriter, request *http.Request) bool
CROSCheckAllowNext enables CORS for requests those match the provided options.
func (*CORSOptions) Header ¶
func (o *CORSOptions) Header(origin string) (headers map[string]string)
Header converts options into CORS headers.
func (*CORSOptions) IsOriginAllowed ¶
func (o *CORSOptions) IsOriginAllowed(origin string) (allowed bool)
IsOriginAllowed looks up if the origin matches one of the patterns generated from CORSOptions.AllowOrigins patterns.
func (*CORSOptions) PreflightHeader ¶
func (o *CORSOptions) PreflightHeader(origin, rMethod, rHeaders string) (headers map[string]string)
PreflightHeader converts options into CORS headers for a preflight response.
type ServerStatus ¶
type ServerStatus struct {
// contains filtered or unexported fields
}
func GetServerStatus ¶
func GetServerStatus() *ServerStatus
func (*ServerStatus) GRPCServer ¶
func (s *ServerStatus) GRPCServer() bool
func (*ServerStatus) HTTPServer ¶
func (s *ServerStatus) HTTPServer() bool
func (*ServerStatus) RAFTServer ¶
func (s *ServerStatus) RAFTServer() bool
func (*ServerStatus) SetGRPCServer ¶
func (s *ServerStatus) SetGRPCServer(b bool)
func (*ServerStatus) SetHTTPServer ¶
func (s *ServerStatus) SetHTTPServer(b bool)
func (*ServerStatus) SetRAFTServer ¶
func (s *ServerStatus) SetRAFTServer(b bool)
Click to show internal directories.
Click to hide internal directories.