Documentation ¶
Index ¶
- func AdminFromContext(ctx context.Context) (value *accountv1.Admin, found bool)
- func ContextWithAdmin(parent context.Context, admin *accountv1.Admin) context.Context
- func Convert[T any](size int, fn func(int) T) (result []T)
- func DevelopmentContext(parent context.Context) context.Context
- func ExposeNodes(nodes ...any) exposedNodes
- func Filter(keyValues ...interface{}) *bindVars
- func GenerateRandomPassword() string
- func IsDevelopmentContext(ctx context.Context) (value bool)
- func Mutation[Arg interfaces.GraphqlArgument, Out interfaces.GraphqlOutput](fn func(context.Context, Arg) (Out, error)) mutation
- func NewConnection(ctx context.Context, conf ConnectionConfig) *connection
- func NewFilesystemStorage(params FilesystemStorageConfig) *filesystemStorage
- func Pure[T any](v T) (result T)
- func Query[Arg interfaces.GraphqlArgument, Out interfaces.GraphqlOutput](fn func(context.Context, Arg) (Out, error)) query
- func ToMap(v any) (result map[string]any)
- type AdminHandler
- func (h *AdminHandler) CreateAccount(ctx context.Context, req *dashboardv1.CreateAccountRequest) (*emptypb.Empty, error)
- func (h *AdminHandler) CreateResource(ctx context.Context, req *dashboardv1.CreateResourceRequest) (*dashboardv1.CreateResourceResponse, error)
- func (h *AdminHandler) DeleteResource(ctx context.Context, req *dashboardv1.DeleteResourceRequest) (*emptypb.Empty, error)
- func (h *AdminHandler) FilesDownloadHandler(w http.ResponseWriter, r *http.Request, pathParams map[string]string)
- func (h *AdminHandler) FilesUploadHandler(w http.ResponseWriter, r *http.Request, _ map[string]string)
- func (h *AdminHandler) GetAccount(ctx context.Context, req *emptypb.Empty) (*dashboardv1.GetAccountResponse, error)
- func (h *AdminHandler) GetResource(ctx context.Context, req *dashboardv1.GetResourceRequest) (*dashboardv1.GetResourceResponse, error)
- func (h *AdminHandler) GetResourceRelation(ctx context.Context, req *dashboardv1.GetResourceRelationRequest) (*dashboardv1.GetResourceRelationResponse, error)
- func (h *AdminHandler) GetSchema(ctx context.Context, req *emptypb.Empty) (*dashboardv1.GetSchemaResponse, error)
- func (h *AdminHandler) Handler(ctx context.Context) http.Handler
- func (h *AdminHandler) ListResources(ctx context.Context, req *dashboardv1.ListResourcesRequest) (*dashboardv1.ListResourcesResponse, error)
- func (h *AdminHandler) Login(ctx context.Context, req *dashboardv1.LoginRequest) (*dashboardv1.LoginResponse, error)
- func (h *AdminHandler) UpdateResource(ctx context.Context, req *dashboardv1.UpdateResourceRequest) (*dashboardv1.UpdateResourceResponse, error)
- type AdminHandlerConfig
- type AdminHandlerParams
- type ApplicationConfig
- type ArangoAccess
- func (e *ArangoAccess) AutoMigrate(ctx context.Context, graph IGraph) error
- func (e *ArangoAccess) Collection(ctx context.Context, elem any, callbacks ...CollectionCallback) (err error)
- func (e *ArangoAccess) Create(ctx context.Context, val any) ([]string, error)
- func (e *ArangoAccess) Delete(ctx context.Context, item any) error
- func (e *ArangoAccess) Find(ctx context.Context, bindVars IVars, out any) error
- func (e *ArangoAccess) List(ctx context.Context, bindVars IVars, out any) (int64, error)
- func (e *ArangoAccess) ListKeys(ctx context.Context, keys []string, out any) error
- func (e *ArangoAccess) Read(ctx context.Context, key string, out any) error
- func (e *ArangoAccess) Relations(ctx context.Context, id string, bindVars IVars, direction Direction, out any) (int64, error)
- func (e *ArangoAccess) Replace(ctx context.Context, key string, item any) error
- func (e *ArangoAccess) Update(ctx context.Context, key string, item any) error
- type CollectionCallback
- type ConnectionConfig
- type Direction
- type Empty
- type Event
- type FilesystemStorageConfig
- type Graph
- func (g *Graph) CollectionFor(t reflect.Type) string
- func (g *Graph) Edge(from, to, edge any)
- func (g *Graph) Edges() []reflect.Type
- func (g *Graph) Node(node any)
- func (g *Graph) Nodes() []reflect.Type
- func (g *Graph) Relation(edge reflect.Type) *Relation
- func (g *Graph) TypeOf(collection string) reflect.Type
- type GraphqlHandler
- type IAccess
- type IConnection
- type IFileStorage
- type IGraph
- type IObserver
- type IVars
- type Observer
- type Processor
- type Relation
- type SourceID
- type Topic
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdminFromContext ¶ added in v0.0.11
AdminFromContext ...
func ContextWithAdmin ¶ added in v0.0.11
ContextWithAdmin ...
func Convert ¶ added in v0.4.6
Convert converts a slice of values to a slice of values using a function
func DevelopmentContext ¶ added in v0.0.12
DevelopmentContext ...
func GenerateRandomPassword ¶ added in v0.4.6
func GenerateRandomPassword() string
generateRandomPassword generates a random password with the following requirements: Password Length: 16 Include Alpha Upper (A-Z): true Include Alpha Lower (a-z): true Include Number (0-9): true
func IsDevelopmentContext ¶ added in v0.0.12
IsDevelopmentContext ...
func Mutation ¶ added in v0.1.0
func Mutation[Arg interfaces.GraphqlArgument, Out interfaces.GraphqlOutput](fn func(context.Context, Arg) (Out, error)) mutation
Mutation ...
func NewConnection ¶
func NewConnection(ctx context.Context, conf ConnectionConfig) *connection
NewConnection ...
func NewFilesystemStorage ¶ added in v0.0.6
func NewFilesystemStorage(params FilesystemStorageConfig) *filesystemStorage
NewFilesystemStorage ...
func Pure ¶ added in v0.4.6
func Pure[T any](v T) (result T)
Pure converts a value to a pure JSON value
func Query ¶ added in v0.1.0
func Query[Arg interfaces.GraphqlArgument, Out interfaces.GraphqlOutput](fn func(context.Context, Arg) (Out, error)) query
Query ...
Types ¶
type AdminHandler ¶ added in v0.4.3
type AdminHandler struct { dashboardv1.UnimplementedAuthenticationServiceServer dashboardv1.UnimplementedResourceServiceServer dashboardv1.UnimplementedSchemaServiceServer // contains filtered or unexported fields }
AdminHandler ...
func NewAdminHandler ¶ added in v0.4.3
func NewAdminHandler(ctx context.Context, config AdminHandlerConfig, params AdminHandlerParams) *AdminHandler
NewAdminHandler ...
func (*AdminHandler) CreateAccount ¶ added in v0.4.6
func (h *AdminHandler) CreateAccount(ctx context.Context, req *dashboardv1.CreateAccountRequest) (*emptypb.Empty, error)
func (*AdminHandler) CreateResource ¶ added in v0.4.6
func (h *AdminHandler) CreateResource(ctx context.Context, req *dashboardv1.CreateResourceRequest) (*dashboardv1.CreateResourceResponse, error)
func (*AdminHandler) DeleteResource ¶ added in v0.4.6
func (h *AdminHandler) DeleteResource(ctx context.Context, req *dashboardv1.DeleteResourceRequest) (*emptypb.Empty, error)
func (*AdminHandler) FilesDownloadHandler ¶ added in v0.4.6
func (h *AdminHandler) FilesDownloadHandler(w http.ResponseWriter, r *http.Request, pathParams map[string]string)
func (*AdminHandler) FilesUploadHandler ¶ added in v0.4.6
func (h *AdminHandler) FilesUploadHandler(w http.ResponseWriter, r *http.Request, _ map[string]string)
func (*AdminHandler) GetAccount ¶ added in v0.4.6
func (h *AdminHandler) GetAccount(ctx context.Context, req *emptypb.Empty) (*dashboardv1.GetAccountResponse, error)
func (*AdminHandler) GetResource ¶ added in v0.4.6
func (h *AdminHandler) GetResource(ctx context.Context, req *dashboardv1.GetResourceRequest) (*dashboardv1.GetResourceResponse, error)
func (*AdminHandler) GetResourceRelation ¶ added in v0.4.6
func (h *AdminHandler) GetResourceRelation(ctx context.Context, req *dashboardv1.GetResourceRelationRequest) (*dashboardv1.GetResourceRelationResponse, error)
func (*AdminHandler) GetSchema ¶ added in v0.4.6
func (h *AdminHandler) GetSchema(ctx context.Context, req *emptypb.Empty) (*dashboardv1.GetSchemaResponse, error)
func (*AdminHandler) Handler ¶ added in v0.4.3
func (h *AdminHandler) Handler(ctx context.Context) http.Handler
func (*AdminHandler) ListResources ¶ added in v0.4.6
func (h *AdminHandler) ListResources(ctx context.Context, req *dashboardv1.ListResourcesRequest) (*dashboardv1.ListResourcesResponse, error)
func (*AdminHandler) Login ¶ added in v0.4.6
func (h *AdminHandler) Login(ctx context.Context, req *dashboardv1.LoginRequest) (*dashboardv1.LoginResponse, error)
func (*AdminHandler) UpdateResource ¶ added in v0.4.6
func (h *AdminHandler) UpdateResource(ctx context.Context, req *dashboardv1.UpdateResourceRequest) (*dashboardv1.UpdateResourceResponse, error)
type AdminHandlerConfig ¶ added in v0.4.3
type AdminHandlerConfig struct {
Secret []byte
}
AdminHandlerConfig ...
type AdminHandlerParams ¶ added in v0.4.3
type AdminHandlerParams struct { fx.In Access IAccess Graph IGraph Storage IFileStorage Observer IObserver[Topic] }
AdminHandlerParams ...
type ApplicationConfig ¶ added in v0.0.9
type ApplicationConfig struct { // Name ... Name string `json:"name"` // Domain ... Domain string `json:"domain"` // Logo ... Logo string `json:"logo"` }
ApplicationConfig ...
type ArangoAccess ¶ added in v0.4.3
type ArangoAccess struct {
// contains filtered or unexported fields
}
func NewArangoAccess ¶ added in v0.4.3
func NewArangoAccess(conn IConnection, observer IObserver[Topic]) *ArangoAccess
func (*ArangoAccess) AutoMigrate ¶ added in v0.4.3
func (e *ArangoAccess) AutoMigrate(ctx context.Context, graph IGraph) error
AutoMigrate ...
func (*ArangoAccess) Collection ¶ added in v0.4.3
func (e *ArangoAccess) Collection(ctx context.Context, elem any, callbacks ...CollectionCallback) (err error)
Collection ...
func (*ArangoAccess) Delete ¶ added in v0.4.3
func (e *ArangoAccess) Delete(ctx context.Context, item any) error
Delete ...
func (*ArangoAccess) Relations ¶ added in v0.4.3
func (e *ArangoAccess) Relations(ctx context.Context, id string, bindVars IVars, direction Direction, out any) (int64, error)
Relations ...
type CollectionCallback ¶ added in v0.4.3
CollectionCallback ...
type ConnectionConfig ¶ added in v0.4.3
type ConnectionConfig struct { // DBName ... DBName string // UserName ... UserName string // Password ... Password string // Connection ... Connection http.ConnectionConfig }
ConnectionConfig ...
type Empty ¶ added in v0.4.3
type Empty struct{}
Empty is ignored from graphql input
func (*Empty) Argument ¶ added in v0.4.3
func (*Empty) Argument() graphql.FieldConfigArgument
type Event ¶
type Event[T comparable] struct { // Topic ... Topic T // Payload ... Payload protoreflect.ProtoMessage // Timestamp ... Timestamp time.Time }
Event ...
type FilesystemStorageConfig ¶ added in v0.4.3
type FilesystemStorageConfig struct { // BasePath ... BasePath string // MaxMemory ... MaxMemory int }
FilesystemStorageConfig ...
type Graph ¶ added in v0.4.3
type Graph struct {
// contains filtered or unexported fields
}
Graph ...
func (*Graph) CollectionFor ¶ added in v0.4.3
CollectionFor ...
type GraphqlHandler ¶ added in v0.4.3
type GraphqlHandler struct {
// contains filtered or unexported fields
}
GraphqlHandler ...
func NewGraphqlHandler ¶ added in v0.4.3
func NewGraphqlHandler(access IAccess, graph IGraph) *GraphqlHandler
NewGraphqlHandler ...
type IAccess ¶ added in v0.4.3
type IAccess interface { // AutoMigrate ... AutoMigrate(ctx context.Context, graph IGraph) error // Collection ... Collection(ctx context.Context, elem any, callbacks ...CollectionCallback) (err error) // List ... List(ctx context.Context, bindVars IVars, out any) (int64, error) // ListKeys ... ListKeys(ctx context.Context, keys []string, out any) error // Find ... Find(ctx context.Context, bindVars IVars, out any) error // Read ... Read(ctx context.Context, key string, out any) error // Create ... Create(ctx context.Context, val any) ([]string, error) // Update ... Update(ctx context.Context, key string, item any) error // Replace ... Replace(ctx context.Context, key string, item any) error // Delete ... Delete(ctx context.Context, item any) error // Relations ... Relations(ctx context.Context, id string, bindVars IVars, direction Direction, out any) (int64, error) }
IAccess ...
type IConnection ¶
type IConnection interface { // Database ... Database(ctx context.Context) (driver.Database, error) // Collection ... Collection(ctx context.Context, elem any) (driver.Collection, error) // Reflect ... Reflect(ctx context.Context, elem reflect.Type) (driver.Collection, error) }
IConnection ...
type IFileStorage ¶ added in v0.0.6
type IFileStorage interface { // StoreFile ... StoreFile(name string, file []byte) (err error) // StoreByHash ... StoreByHash(file []byte) (hash string, err error) // ReadFile ... ReadFile(name string) (fileContent []byte, errr error) // MaxMemory ... MaxMemory() int }
IFileStorage ...
type IGraph ¶ added in v0.4.3
type IGraph interface { // Node ... Node(node any) // Edge ... Edge(from, to, edge any) // Nodes ... Nodes() []reflect.Type // Edges ... Edges() []reflect.Type // Relation ... Relation(edge reflect.Type) *Relation // CollectionFor ... CollectionFor(elem reflect.Type) string // TypeOf ... TypeOf(name string) reflect.Type }
IGraph ...
type IObserver ¶
type IObserver[T comparable] interface { // Subscribe ... Subscribe(t T, p Processor[T]) SourceID // Unsubscribe ... Unsubscribe(s SourceID) // Emit ... Emit(e *Event[T]) error }
IObserver ...
type IVars ¶ added in v0.4.6
type IVars interface { // Limit ... Limit() string // Filters ... Filters() string // Values ... Values() map[string]interface{} }
IVars ...
type Observer ¶
type Observer[T comparable] struct { // contains filtered or unexported fields }
Observer ...
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
pkg
|
|
dashboard/domain/authentication/v1
Package authenticationv1 is a reverse proxy.
|
Package authenticationv1 is a reverse proxy. |
dashboard/domain/dashboard/v1
Package dashboardv1 is a reverse proxy.
|
Package dashboardv1 is a reverse proxy. |