Documentation
¶
Index ¶
- Constants
- Variables
- func AdminKeyFromContext(ctx context.Context) (value string, found bool)
- func BaseType(elem any) reflect.Type
- func Broadcast[T comparable](observer Observer[T], payload protoreflect.ProtoMessage, topics ...T)
- func COUNT[T proto.Message](filter Filters) (q string, bindVars map[string]interface{})
- func Collection[T any]() string
- func ConfigFromEnv[T proto.Message](defaultConf T) T
- func ConnectionClosed(conn *websocket.Conn) <-chan struct{}
- func ContextWithAdminKey(parent context.Context, key string) context.Context
- func ContextWithDirectives(parent context.Context, directives []string) context.Context
- func ContextWithSession(parent context.Context, session *authv1.Session) context.Context
- func CreateAdminAccount(ctx context.Context, access Access, req *dashboardv1.RegisterAccountRequest) (key, password string, err error)
- func DOCUMENT(id string) (q string, bindVars map[string]interface{})
- func DirectivesFromContext(ctx context.Context) (directives []string, found bool)
- func Dot(parts ...string) string
- func DoubleQuote(s string) string
- func Enforce[T proto.Message](ctx context.Context, enforcer casbin.IEnforcer, subjectFn SubjectFn[T], ...) (subject T, authorized bool)
- func Enforcer(conf, policy string) func() (*casbin.Enforcer, error)
- func Expose[T proto.Message]() exposed
- func FOR[T proto.Message](filter Filters) (q string, bindVars map[string]interface{})
- func Filter(exprs ...string) filters
- func FilterFrom[T proto.Message](elem T) filters
- func GraphqlMiddleware(next http.Handler) http.Handler
- func HandleDownloadFile(fs FileStorage) http.HandlerFunc
- func HandleUploadFile(fs FileStorage) http.HandlerFunc
- func HashFile(file []byte) (string, error)
- func ID[T any](key string) string
- func JSONName(f reflect.StructField) string
- func Join(parts ...string) string
- func Map[T any](size int, fn func(int) T) (result []T)
- func Mutation[Arg, Out proto.Message](fn func(context.Context, Arg) (Out, error)) mutation
- func NewBitcoinCore(ctx context.Context, config *configv1.Bitcoin, observer Observer[Topic], ...) *bitcoinCore
- func NewConnection(ctx context.Context, conf *configv1.Connection) (*connection, error)
- func NewDbFileStorage(access Access) (*dbFileStorage, error)
- func NewEnforcer(conf, policy string) (*casbin.Enforcer, error)
- func NewFilesystemStorage(config *configv1.FilesystemStorage) *filesystemStorage
- func NewGraph() *graph
- func NewObserver[T comparable]() *observer[T]
- func OTPMailSubscriber(ctx context.Context, config *configv1.Mail, message OTPMailTemplate) (Topic, Processor[Topic])
- func ProtoMarshal(v any, out proto.Message) error
- func Provide[T any](val any) fx.Option
- func Pure[T any](v T) (result T)
- func Query[Arg, Out proto.Message](fn func(context.Context, Arg) (Out, error)) query
- func QueryFilter(parts ...string) string
- func QueryJoin(parts ...string) string
- func Quote(s string) string
- func REMOVE[T proto.Message](filter Filters) (q string, bindVars map[string]interface{})
- func ReadReset(r *http.Request) ([]byte, error)
- func ResourceID(resource, key string) string
- func Select[T any](v T) selector[T]
- func SessionFromContext(ctx context.Context) (session *authv1.Session, found bool)
- func Should[T any](v T, _ error) T
- func Subject[T proto.Message](ctx context.Context, subject SubjectFn[T]) (val T, err error)
- func ToMap(v any) (result map[string]any)
- func ValueOfEnum(enum protoreflect.EnumDescriptor, name string) protoreflect.Value
- type Access
- type ArangoAccess
- func (e *ArangoAccess) AutoMigrate(ctx context.Context, graph Graph) error
- func (e *ArangoAccess) Collection(ctx context.Context, elem any, ...) (col driver.Collection, 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) Fetch(ctx context.Context, query string, bindVars map[string]any, out any) error
- func (e *ArangoAccess) Get(ctx context.Context, filters Filters, out any) error
- func (e *ArangoAccess) List(ctx context.Context, filters Filters, out any) (int64, error)
- func (e *ArangoAccess) Query(ctx context.Context, query string, bindVars map[string]any, out any) error
- func (e *ArangoAccess) Relations(ctx context.Context, id string, filters Filters, 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 AuthHandler
- func (h *AuthHandler) Handler(ctx context.Context) http.Handler
- func (h *AuthHandler) Middleware(next http.Handler) http.Handler
- func (h *AuthHandler) RefreshToken(ctx context.Context, req *emptypb.Empty) (*authv1.RefreshTokenResponse, error)
- func (h *AuthHandler) RequestOTP(ctx context.Context, req *authv1.RequestOTPRequest) (*argumentv1.Success, error)
- func (h *AuthHandler) ValidateSSOToken(ctx context.Context, req *emptypb.Empty) (*authv1.ValidateSSOTokenResponse, error)
- func (h *AuthHandler) VerifyOTP(ctx context.Context, req *authv1.VerifyOTPRequest) (*authv1.VerifyOTPResponse, error)
- type AuthHandlerParams
- type BitcoinPaymentGateway
- func (h *BitcoinPaymentGateway) CreateInvoice(ctx context.Context, req *bitcoinv1.CreateInvoiceRequest) (*bitcoinv1.CreateInvoiceResponse, error)
- func (h *BitcoinPaymentGateway) Export(ctx context.Context, req *bitcoinv1.ExportRequest) (*bitcoinv1.ExportResponse, error)
- func (h *BitcoinPaymentGateway) GetInvoice(ctx context.Context, req *bitcoinv1.GetInvoiceRequest) (resp *bitcoinv1.GetInvoiceResponse, err error)
- func (h *BitcoinPaymentGateway) Handler(ctx context.Context, middlewares ...runtime.Middleware) http.Handler
- func (h *BitcoinPaymentGateway) ListInvoices(ctx context.Context, req *bitcoinv1.ListInvoicesRequest) (*bitcoinv1.ListInvoicesResponse, error)
- func (*BitcoinPaymentGateway) Ping(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
- func (h *BitcoinPaymentGateway) RefreshInvoice(ctx context.Context, req *bitcoinv1.RefreshInvoiceRequest) (*bitcoinv1.RefreshInvoiceResponse, error)
- func (h *BitcoinPaymentGateway) Subscribe(w http.ResponseWriter, r *http.Request, pathParams map[string]string)
- type BitcoinPaymentGatewayParams
- type CasbinAdapter
- func (a *CasbinAdapter[T]) AddPolicy(sec string, ptype string, rule []string) error
- func (a *CasbinAdapter[T]) ExtraFields() (result []protoreflect.FieldDescriptor)
- func (a *CasbinAdapter[T]) LoadPolicy(model model.Model) error
- func (a *CasbinAdapter[T]) Marshal(elem T) (sec string, ptype string, rule []string)
- func (a *CasbinAdapter[T]) RemoveFilteredPolicy(sec string, ptype string, fieldIndex int, fieldValues ...string) error
- func (a *CasbinAdapter[T]) RemovePolicy(sec string, ptype string, rule []string) error
- func (a *CasbinAdapter[T]) SavePolicy(model model.Model) error
- func (a *CasbinAdapter[T]) Unmarshal(sec string, ptype string, rule []string) (out T, err error)
- type Checks
- type Comparer
- type Connection
- type DashboardHandler
- func (h *DashboardHandler) AuthorizeMiddleware(skip ...*regexp.Regexp) runtime.Middleware
- func (h *DashboardHandler) CreateResource(ctx context.Context, req *dashboardv1.CreateResourceRequest) (*dashboardv1.CreateResourceResponse, error)
- func (h *DashboardHandler) DeleteAccount(ctx context.Context, req *dashboardv1.DeleteAccountRequest) (*emptypb.Empty, error)
- func (h *DashboardHandler) DeleteResource(ctx context.Context, req *dashboardv1.DeleteResourceRequest) (*emptypb.Empty, error)
- func (h *DashboardHandler) GetAccount(ctx context.Context, req *dashboardv1.GetAccountRequest) (*dashboardv1.GetAccountResponse, error)
- func (h *DashboardHandler) GetResource(ctx context.Context, req *dashboardv1.GetResourceRequest) (*dashboardv1.GetResourceResponse, error)
- func (h *DashboardHandler) GetResourceRelation(ctx context.Context, req *dashboardv1.GetResourceRelationRequest) (*dashboardv1.GetResourceRelationResponse, error)
- func (h *DashboardHandler) GetSchema(ctx context.Context, req *emptypb.Empty) (*dashboardv1.GetSchemaResponse, error)
- func (h *DashboardHandler) GetSession(ctx context.Context, _ *emptypb.Empty) (*dashboardv1.GetSessionResponse, error)
- func (h *DashboardHandler) Handler(ctx context.Context) http.Handler
- func (h *DashboardHandler) ListAccounts(ctx context.Context, _ *emptypb.Empty) (*dashboardv1.ListAccountsResponse, error)
- func (h *DashboardHandler) ListResources(ctx context.Context, req *dashboardv1.ListResourcesRequest) (*dashboardv1.ListResourcesResponse, error)
- func (h *DashboardHandler) Login(ctx context.Context, req *dashboardv1.LoginRequest) (*dashboardv1.LoginResponse, error)
- func (h *DashboardHandler) RegisterAccount(ctx context.Context, req *dashboardv1.RegisterAccountRequest) (*dashboardv1.RegisterAccountResponse, error)
- func (h *DashboardHandler) UpdateDetails(ctx context.Context, req *dashboardv1.UpdateDetailsRequest) (*dashboardv1.UpdateDetailsResponse, error)
- func (h *DashboardHandler) UpdateNotes(ctx context.Context, req *dashboardv1.UpdateNotesRequest) (*dashboardv1.UpdateNotesResponse, error)
- func (h *DashboardHandler) UpdatePassword(ctx context.Context, req *dashboardv1.UpdatePasswordRequest) (*emptypb.Empty, error)
- func (h *DashboardHandler) UpdateResource(ctx context.Context, req *dashboardv1.UpdateResourceRequest) (*dashboardv1.UpdateResourceResponse, error)
- func (h *DashboardHandler) UpdateScopes(ctx context.Context, req *dashboardv1.UpdateScopesRequest) (*dashboardv1.UpdateScopesResponse, error)
- func (h *DashboardHandler) UpdateStatus(ctx context.Context, req *dashboardv1.UpdateStatusRequest) (*dashboardv1.UpdateStatusResponse, error)
- type DashboardParams
- type Direction
- type EnforceFn
- type Eq
- type Event
- type FileStorage
- type Filters
- type Graph
- type GraphqlHandler
- type Gt
- type Gte
- type Lt
- type Lte
- type Middleware
- type OTPMailTemplate
- type Observer
- type Processor
- type Relation
- type Rule
- type Rules
- type SourceID
- type SubjectFn
- type Topic
Constants ¶
const ( // RequestMaxBodySize limits the amount of data read from the request body to prevent memory exhaustion RequestMaxBodySize = 2 * 1024 * 1024 // 2 MB )
Variables ¶
var (
OTPRequestedTopic = Topic("auth.otp.requested")
)
Functions ¶
func Broadcast ¶ added in v0.11.0
func Broadcast[T comparable](observer Observer[T], payload protoreflect.ProtoMessage, topics ...T)
Broadcast emits an event to the observer for the given topics
func COUNT ¶ added in v0.12.7
COUNT returns the number of documents in a collection
Example: "RETURN COUNT(FOR doc IN col FILTER doc.name == @name RETURN doc)" {"name": "John"}
func Collection ¶
Collection returns the name of the collection for the given element
func ConfigFromEnv ¶
func ConnectionClosed ¶ added in v0.11.0
ConnectionClosed returns a channel that is closed when the connection is closed
func ContextWithAdminKey ¶
func ContextWithDirectives ¶
func ContextWithSession ¶
func CreateAdminAccount ¶ added in v0.11.12
func CreateAdminAccount(ctx context.Context, access Access, req *dashboardv1.RegisterAccountRequest) (key, password string, err error)
func DOCUMENT ¶ added in v0.12.0
DOCUMENT returns a document by its id
Example: "RETURN DOCUMENT(@id)" {"id": "col/123"}
func DirectivesFromContext ¶
func Enforce ¶
func Enforce[T proto.Message](ctx context.Context, enforcer casbin.IEnforcer, subjectFn SubjectFn[T], enforceFn EnforceFn[T]) (subject T, authorized bool)
Enforce is a helper function to enforce a policy
func FOR ¶ added in v0.12.0
FOR returns documents from a collection
Example: "FOR doc IN col FILTER doc.name == @name RETURN doc" {"name": "John"}
func GraphqlMiddleware ¶
GraphqlMiddleware injects the directives into the context
func HandleDownloadFile ¶
func HandleDownloadFile(fs FileStorage) http.HandlerFunc
func HandleUploadFile ¶
func HandleUploadFile(fs FileStorage) http.HandlerFunc
func JSONName ¶
func JSONName(f reflect.StructField) string
JSONName returns the name of the field in the JSON tag
func NewBitcoinCore ¶ added in v0.11.0
func NewConnection ¶
func NewConnection(ctx context.Context, conf *configv1.Connection) (*connection, error)
NewConnection ...
func NewDbFileStorage ¶
NewDbFileStorage ...
func NewEnforcer ¶ added in v0.11.22
func NewFilesystemStorage ¶
func NewFilesystemStorage(config *configv1.FilesystemStorage) *filesystemStorage
NewFilesystemStorage ...
func OTPMailSubscriber ¶
func OTPMailSubscriber(ctx context.Context, config *configv1.Mail, message OTPMailTemplate) (Topic, Processor[Topic])
OTPMailSubscriber is a function that sends an email to the user with the OTP code
func QueryFilter ¶ added in v0.11.0
func REMOVE ¶ added in v0.12.0
REMOVE removes documents from a collection
Example: "FOR doc IN col FILTER doc.name == @name REMOVE doc IN col" {"name": "John"}
func ReadReset ¶ added in v0.12.8
ReadReset reads and returns the full body of the request without consuming it permanently. It restores the body so it can be read again later. Returns an error if reading fails or body exceeds MaxBodySize.
func ResourceID ¶
func Select ¶
func Select[T any](v T) selector[T]
Select returns a new selector with the given value
func SessionFromContext ¶
func ValueOfEnum ¶ added in v0.10.11
func ValueOfEnum(enum protoreflect.EnumDescriptor, name string) protoreflect.Value
Types ¶
type Access ¶
type Access interface {
// AutoMigrate ...
AutoMigrate(ctx context.Context, graph Graph) error
// Collection ...
Collection(ctx context.Context, elem any, callbacks ...func(context.Context, driver.Collection)) (driver.Collection, error)
// Query returns a list of elements
Query(ctx context.Context, query string, bindVars map[string]any, out any) error
// Fetch returns a single element
Fetch(ctx context.Context, query string, bindVars map[string]any, out any) error
// List ...
List(ctx context.Context, filters Filters, out any) (int64, error)
// Get ...
Get(ctx context.Context, filters Filters, 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, filters Filters, direction Direction, out any) (int64, error)
}
Access ...
type ArangoAccess ¶
type ArangoAccess struct {
// contains filtered or unexported fields
}
func NewArangoAccess ¶
func NewArangoAccess(conn Connection, observer Observer[Topic]) (*ArangoAccess, error)
func (*ArangoAccess) AutoMigrate ¶
func (e *ArangoAccess) AutoMigrate(ctx context.Context, graph Graph) error
AutoMigrate ...
func (*ArangoAccess) Collection ¶
func (e *ArangoAccess) Collection(ctx context.Context, elem any, callbacks ...func(context.Context, driver.Collection)) (col driver.Collection, err error)
Collection ...
func (*ArangoAccess) Delete ¶
func (e *ArangoAccess) Delete(ctx context.Context, item any) error
Delete ...
func (*ArangoAccess) Fetch ¶
func (e *ArangoAccess) Fetch(ctx context.Context, query string, bindVars map[string]any, out any) error
Fetch ...
func (*ArangoAccess) Query ¶
func (e *ArangoAccess) Query(ctx context.Context, query string, bindVars map[string]any, out any) error
Query ...
func (*ArangoAccess) Relations ¶
func (e *ArangoAccess) Relations(ctx context.Context, id string, filters Filters, direction Direction, out any) (int64, error)
Relations ...
type AuthHandler ¶
type AuthHandler struct {
authv1.UnsafeAuthenticationServiceServer
// contains filtered or unexported fields
}
func NewAuthHandler ¶
func NewAuthHandler(ctx context.Context, config *configv1.Auth, params AuthHandlerParams) (*AuthHandler, error)
func (*AuthHandler) Middleware ¶
func (h *AuthHandler) Middleware(next http.Handler) http.Handler
func (*AuthHandler) RefreshToken ¶
func (h *AuthHandler) RefreshToken(ctx context.Context, req *emptypb.Empty) (*authv1.RefreshTokenResponse, error)
func (*AuthHandler) RequestOTP ¶
func (h *AuthHandler) RequestOTP(ctx context.Context, req *authv1.RequestOTPRequest) (*argumentv1.Success, error)
func (*AuthHandler) ValidateSSOToken ¶
func (h *AuthHandler) ValidateSSOToken(ctx context.Context, req *emptypb.Empty) (*authv1.ValidateSSOTokenResponse, error)
func (*AuthHandler) VerifyOTP ¶
func (h *AuthHandler) VerifyOTP(ctx context.Context, req *authv1.VerifyOTPRequest) (*authv1.VerifyOTPResponse, error)
type AuthHandlerParams ¶
type BitcoinPaymentGateway ¶ added in v0.11.0
type BitcoinPaymentGateway struct {
bitcoinv1.UnsafeBitcoinPaymentServiceServer
// contains filtered or unexported fields
}
func NewBitcoinPaymentGateway ¶ added in v0.11.0
func NewBitcoinPaymentGateway(ctx context.Context, config *configv1.Bitcoin, params BitcoinPaymentGatewayParams) (*BitcoinPaymentGateway, error)
func (*BitcoinPaymentGateway) CreateInvoice ¶ added in v0.11.0
func (h *BitcoinPaymentGateway) CreateInvoice(ctx context.Context, req *bitcoinv1.CreateInvoiceRequest) (*bitcoinv1.CreateInvoiceResponse, error)
func (*BitcoinPaymentGateway) Export ¶ added in v0.11.0
func (h *BitcoinPaymentGateway) Export(ctx context.Context, req *bitcoinv1.ExportRequest) (*bitcoinv1.ExportResponse, error)
func (*BitcoinPaymentGateway) GetInvoice ¶ added in v0.11.0
func (h *BitcoinPaymentGateway) GetInvoice(ctx context.Context, req *bitcoinv1.GetInvoiceRequest) (resp *bitcoinv1.GetInvoiceResponse, err error)
func (*BitcoinPaymentGateway) Handler ¶ added in v0.11.0
func (h *BitcoinPaymentGateway) Handler(ctx context.Context, middlewares ...runtime.Middleware) http.Handler
func (*BitcoinPaymentGateway) ListInvoices ¶ added in v0.11.0
func (h *BitcoinPaymentGateway) ListInvoices(ctx context.Context, req *bitcoinv1.ListInvoicesRequest) (*bitcoinv1.ListInvoicesResponse, error)
func (*BitcoinPaymentGateway) RefreshInvoice ¶ added in v0.11.0
func (h *BitcoinPaymentGateway) RefreshInvoice(ctx context.Context, req *bitcoinv1.RefreshInvoiceRequest) (*bitcoinv1.RefreshInvoiceResponse, error)
func (*BitcoinPaymentGateway) Subscribe ¶ added in v0.11.0
func (h *BitcoinPaymentGateway) Subscribe(w http.ResponseWriter, r *http.Request, pathParams map[string]string)
type BitcoinPaymentGatewayParams ¶ added in v0.11.0
type CasbinAdapter ¶
CasbinAdapter ...
func Unsafe_NewCasbinAdapter ¶
func Unsafe_NewCasbinAdapter[T proto.Message](ctx context.Context, access Access) (*CasbinAdapter[T], error)
Unsafe_NewCasbinAdapter ... TODO: finish this
func (*CasbinAdapter[T]) AddPolicy ¶
func (a *CasbinAdapter[T]) AddPolicy(sec string, ptype string, rule []string) error
AddPolicy implements persist.Adapter.
func (*CasbinAdapter[T]) ExtraFields ¶ added in v0.10.11
func (a *CasbinAdapter[T]) ExtraFields() (result []protoreflect.FieldDescriptor)
func (*CasbinAdapter[T]) LoadPolicy ¶
func (a *CasbinAdapter[T]) LoadPolicy(model model.Model) error
LoadPolicy implements persist.Adapter.
func (*CasbinAdapter[T]) Marshal ¶
func (a *CasbinAdapter[T]) Marshal(elem T) (sec string, ptype string, rule []string)
func (*CasbinAdapter[T]) RemoveFilteredPolicy ¶
func (a *CasbinAdapter[T]) RemoveFilteredPolicy(sec string, ptype string, fieldIndex int, fieldValues ...string) error
RemoveFilteredPolicy implements persist.Adapter.
func (*CasbinAdapter[T]) RemovePolicy ¶
func (a *CasbinAdapter[T]) RemovePolicy(sec string, ptype string, rule []string) error
RemovePolicy implements persist.Adapter.
func (*CasbinAdapter[T]) SavePolicy ¶
func (a *CasbinAdapter[T]) SavePolicy(model model.Model) error
SavePolicy implements persist.Adapter.
type Checks ¶ added in v0.12.8
Checks is a collection of functions that can be used to check if a key should be ignored
type Comparer ¶ added in v0.12.0
type Comparer interface {
Symbol() string
Value() interface{}
}
Comparer ...
type Connection ¶
type Connection 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)
}
Connection ...
type DashboardHandler ¶
type DashboardHandler struct {
Access
Graph
Observer[Topic]
FileStorage
dashboardv1.UnimplementedAuthenticationServiceServer
dashboardv1.UnimplementedAccountServiceServer
dashboardv1.UnimplementedResourceServiceServer
dashboardv1.UnimplementedSchemaServiceServer
// contains filtered or unexported fields
}
DashboardHandler ...
func NewDashboard ¶
func NewDashboard(ctx context.Context, config *configv1.Dashboard, params DashboardParams) (*DashboardHandler, error)
NewDashboard ...
func (*DashboardHandler) AuthorizeMiddleware ¶ added in v0.10.11
func (h *DashboardHandler) AuthorizeMiddleware(skip ...*regexp.Regexp) runtime.Middleware
func (*DashboardHandler) CreateResource ¶
func (h *DashboardHandler) CreateResource(ctx context.Context, req *dashboardv1.CreateResourceRequest) (*dashboardv1.CreateResourceResponse, error)
func (*DashboardHandler) DeleteAccount ¶ added in v0.11.12
func (h *DashboardHandler) DeleteAccount(ctx context.Context, req *dashboardv1.DeleteAccountRequest) (*emptypb.Empty, error)
func (*DashboardHandler) DeleteResource ¶
func (h *DashboardHandler) DeleteResource(ctx context.Context, req *dashboardv1.DeleteResourceRequest) (*emptypb.Empty, error)
func (*DashboardHandler) GetAccount ¶
func (h *DashboardHandler) GetAccount(ctx context.Context, req *dashboardv1.GetAccountRequest) (*dashboardv1.GetAccountResponse, error)
func (*DashboardHandler) GetResource ¶
func (h *DashboardHandler) GetResource(ctx context.Context, req *dashboardv1.GetResourceRequest) (*dashboardv1.GetResourceResponse, error)
func (*DashboardHandler) GetResourceRelation ¶
func (h *DashboardHandler) GetResourceRelation(ctx context.Context, req *dashboardv1.GetResourceRelationRequest) (*dashboardv1.GetResourceRelationResponse, error)
func (*DashboardHandler) GetSchema ¶
func (h *DashboardHandler) GetSchema(ctx context.Context, req *emptypb.Empty) (*dashboardv1.GetSchemaResponse, error)
func (*DashboardHandler) GetSession ¶ added in v0.11.12
func (h *DashboardHandler) GetSession(ctx context.Context, _ *emptypb.Empty) (*dashboardv1.GetSessionResponse, error)
func (*DashboardHandler) Handler ¶
func (h *DashboardHandler) Handler(ctx context.Context) http.Handler
func (*DashboardHandler) ListAccounts ¶ added in v0.11.12
func (h *DashboardHandler) ListAccounts(ctx context.Context, _ *emptypb.Empty) (*dashboardv1.ListAccountsResponse, error)
func (*DashboardHandler) ListResources ¶
func (h *DashboardHandler) ListResources(ctx context.Context, req *dashboardv1.ListResourcesRequest) (*dashboardv1.ListResourcesResponse, error)
RESOURCES
func (*DashboardHandler) Login ¶
func (h *DashboardHandler) Login(ctx context.Context, req *dashboardv1.LoginRequest) (*dashboardv1.LoginResponse, error)
AUTHENTICATION
func (*DashboardHandler) RegisterAccount ¶ added in v0.11.12
func (h *DashboardHandler) RegisterAccount(ctx context.Context, req *dashboardv1.RegisterAccountRequest) (*dashboardv1.RegisterAccountResponse, error)
func (*DashboardHandler) UpdateDetails ¶ added in v0.11.12
func (h *DashboardHandler) UpdateDetails(ctx context.Context, req *dashboardv1.UpdateDetailsRequest) (*dashboardv1.UpdateDetailsResponse, error)
func (*DashboardHandler) UpdateNotes ¶ added in v0.11.12
func (h *DashboardHandler) UpdateNotes(ctx context.Context, req *dashboardv1.UpdateNotesRequest) (*dashboardv1.UpdateNotesResponse, error)
func (*DashboardHandler) UpdatePassword ¶ added in v0.11.14
func (h *DashboardHandler) UpdatePassword(ctx context.Context, req *dashboardv1.UpdatePasswordRequest) (*emptypb.Empty, error)
func (*DashboardHandler) UpdateResource ¶
func (h *DashboardHandler) UpdateResource(ctx context.Context, req *dashboardv1.UpdateResourceRequest) (*dashboardv1.UpdateResourceResponse, error)
func (*DashboardHandler) UpdateScopes ¶ added in v0.11.12
func (h *DashboardHandler) UpdateScopes(ctx context.Context, req *dashboardv1.UpdateScopesRequest) (*dashboardv1.UpdateScopesResponse, error)
func (*DashboardHandler) UpdateStatus ¶ added in v0.11.12
func (h *DashboardHandler) UpdateStatus(ctx context.Context, req *dashboardv1.UpdateStatusRequest) (*dashboardv1.UpdateStatusResponse, error)
type DashboardParams ¶
DashboardParams ...
type Direction ¶
type Direction int
Direction is a direction of a relation.
INBOUND: the relation is inbound to the node, means the node is the target of the relation.
OUTBOUND: the relation is outbound from the node, means the node is the source of the relation.
ANY: the relation is inbound or outbound from the node, means the node is the source or target of the relation.
type Event ¶
type Event[T comparable] struct { // Topic ... Topic T // Payload ... Payload protoreflect.ProtoMessage // Timestamp ... Timestamp time.Time }
Event ...
type FileStorage ¶
type FileStorage interface {
// StoreFile ...
StoreFile(name string, file []byte) (id string, err error)
// StoreByHash ...
StoreByHash(file []byte) (id string, err error)
// ReadFile ...
ReadFile(id string) (fileContent []byte, errr error)
// MaxMemory ...
MaxMemory() int64
}
FileStorage ...
type Filters ¶ added in v0.12.0
type Filters interface {
// FilterString ...
FilterString(doc string) string
// SortString ...
SortString(doc string) string
// LimitString ...
LimitString() string
// BindVars ...
BindVars() map[string]interface{}
}
Filters ...
type Graph ¶
type Graph 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
}
Graph ...
type GraphqlHandler ¶
GraphqlHandler ...
type Middleware ¶ added in v0.12.10
Middleware is a function that wraps an http.Handler to add functionality before and/or after the handler is executed.
func CreateStack ¶ added in v0.12.10
func CreateStack(middleware ...Middleware) Middleware
CreateStack composes multiple Middleware into a single one, applying them in the order provided (first to last).
func Match ¶
func Match(re *regexp.Regexp, mw ...Middleware) Middleware
Match applies a single mux.MiddlewareFunc only if the request path matches the given regexp.
type OTPMailTemplate ¶
OTPMailTemplate is a function that returns the message to send to the user
type Observer ¶
type Observer[T comparable] interface { // Subscribe ... Subscribe(t T, p Processor[T]) SourceID // Unsubscribe ... Unsubscribe(s SourceID) // Emit ... Emit(e *Event[T]) error }
Observer ...
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
examples
|
|
|
library
command
|
|
|
internal
|
|
|
pkg
|
|
|
auth/domain/auth/v1
Package authv1 is a reverse proxy.
|
Package authv1 is a reverse proxy. |
|
dashboard/domain/dashboard/v1
Package dashboardv1 is a reverse proxy.
|
Package dashboardv1 is a reverse proxy. |
|
payment/domain/bitcoin/v1
Package bitcoinv1 is a reverse proxy.
|
Package bitcoinv1 is a reverse proxy. |