Documentation ¶
Index ¶
- func SetActor(ctx context.Context, actor Actor) context.Context
- type Actor
- func GetActor(ctx context.Context) *Actor
- func GetActorOrUnknown(ctx context.Context) Actor
- func NewExternalCloudAuth(typ, service string) Actor
- func NewExternalLanggraph(userID ksuid.ID) Actor
- func NewExternalRevenuecat() Actor
- func NewExternalUser(typ, id, reference string) Actor
- func NewInternal(skip int, codePathFallback string) Actor
- func NewService(env, service string) Actor
- func NewSession(sessionID ksuid.ID) Actor
- func NewUnknown(params map[string]any) Actor
- func NewUser(sessionID, userID ksuid.ID) Actor
- type Actorer
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Actor ¶
type Actor struct { Type Type `bson:"type" json:"type"` Params map[string]any `bson:"params" json:"params"` }
func GetActorOrUnknown ¶
func NewExternalCloudAuth ¶
func NewExternalLanggraph ¶
func NewExternalRevenuecat ¶
func NewExternalRevenuecat() Actor
func NewExternalUser ¶
func NewInternal ¶
NewInternal represents a decision made within your service. Where as service is used to mark a decision made from another service calling in.
The argument skip is the number of stack frames to skip before identifying the frame to use, with 0 identifying the frame for NewInternal itself and 1 identifying the caller of NewInternal.
func NewService ¶
func NewSession ¶
func NewUnknown ¶
type Type ¶
type Type string
var ( TypeUnknown Type = "unknown" TypeInternal Type = "internal" TypeService Type = "service" // Mojo service TypeUser Type = "user" // Mojo user TypeSession Type = "session" TypeExternalCloudAuth Type = "external_cloud_auth" // non-Mojo system TypeExternalUser Type = "external_user" // non-Mojo user TypeExternalLanggraph Type = "external_langgraph" TypeExternalRevenuecat Type = "external_revenuecat" )
Click to show internal directories.
Click to hide internal directories.