Documentation ¶
Index ¶
- Variables
- type HypCore
- func (h *HypCore) AddGraphQLMutationField(name string, field *graphql.Field)
- func (h *HypCore) AddGraphQLQueryField(name string, field *graphql.Field)
- func (h *HypCore) AddMiddleware(mi core2.MiddlewareInterface)
- func (h *HypCore) AddRoute(pattern string, httpHandlerObject core2.ServeHTTPInterface)
- func (h *HypCore) ClearKeyValueStore()
- func (h *HypCore) GetContext() *core2.HContext
- func (h *HypCore) GetValue(key string) string
- func (h *HypCore) HasAuthVerify() bool
- func (h *HypCore) ReconfigurePath(webSocketUpgradePath []byte, graphQLPath []byte, livePath []byte, ...)
- func (h *HypCore) RemoveValue(key string)
- func (h *HypCore) SetIsLive(live bool)
- func (h *HypCore) SetKeyValueStore(dataMap map[string]string)
- func (h *HypCore) SetValue(key string, value string)
- func (h *HypCore) Setup()
- func (h *HypCore) Start()
- type HypCoreConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Authors = "Md Kawser Munshi" Version = "1.0.0" AppName = "HypCore" AppNameLong = "Hyper Core" AppDescription = "Hyper Core is a small reusable high performance websocket and graphql focused golang package" )
Functions ¶
This section is empty.
Types ¶
type HypCore ¶
type HypCore struct {
// contains filtered or unexported fields
}
func (*HypCore) AddGraphQLMutationField ¶
func (*HypCore) AddGraphQLQueryField ¶
func (*HypCore) AddMiddleware ¶
func (h *HypCore) AddMiddleware(mi core2.MiddlewareInterface)
func (*HypCore) AddRoute ¶
func (h *HypCore) AddRoute(pattern string, httpHandlerObject core2.ServeHTTPInterface)
func (*HypCore) ClearKeyValueStore ¶
func (h *HypCore) ClearKeyValueStore()
Clear key value store of context
func (*HypCore) GetContext ¶
func (*HypCore) HasAuthVerify ¶
func (*HypCore) ReconfigurePath ¶
func (*HypCore) RemoveValue ¶
Remove a value from the key value store of context
func (*HypCore) SetKeyValueStore ¶
type HypCoreConfig ¶
type HypCoreConfig struct { Host string Port string EPollEventQueueSize int EPollWaitingTime int EnableTLS bool CertFile string KeyFile string EnableAuthVerify bool EnableLivePath bool EnableAuthPath bool EnableGraphQLPath bool EnableWebSocketPath bool DbPath string AuthBearer string AuthPublicKey string AuthPrivateKey string AuthSecretKey string AuthAlgorithm string AuthIssuer string AuthAudiences []string AuthTokenDefaultTimeout int64 AuthTokenSuperGroupTimeout int64 AuthTokenServiceGroupTimeout int64 AuthTokenNormalGroupTimeout int64 AuthVerify core2.AuthVerifyInterface ServeWS core2.ServeWSInterface OnlineUserDataStore core2.OnlineUserDataStoreInterface StorageEngine core2.StorageInterface // If set, all origins are allowed. CORSAllowAllOrigins bool // A list of allowed origins. Wild cards and FQDNs are supported. CORSAllowOrigins []string // If set, allows to share auth credentials such as cookies. CORSAllowCredentials bool // A list of allowed HTTP methods. CORSAllowMethods []string // A list of allowed HTTP headers. CORSAllowHeaders []string // A list of exposed HTTP headers. CORSExposeHeaders []string // Max age of the CORS headers. CORSMaxAge time.Duration }
Click to show internal directories.
Click to hide internal directories.