Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Actor ¶
Actor 表示请求发起者的最小调用源拓扑通用语:仅含 ID/Type/DisplayName 三件套。
协议特定字段(OAuth/OIDC:Email/Subject/ClientID/Realm/Roles/Scopes 与开放扩展袋 Attrs)不在该接口暴露;如业务需要,请由业务自定义 ctx 信道(如业务自家 IAM 包提供的 WithUserInfo / UserInfoFromContext)承载,servora 主仓不预设 OIDC ctx 信道。
type AnonymousActor ¶
type AnonymousActor struct{}
AnonymousActor represents an unauthenticated request initiator.
func NewAnonymousActor ¶
func NewAnonymousActor() *AnonymousActor
func (*AnonymousActor) DisplayName ¶
func (a *AnonymousActor) DisplayName() string
func (*AnonymousActor) ID ¶
func (a *AnonymousActor) ID() string
func (*AnonymousActor) Type ¶
func (a *AnonymousActor) Type() Type
type ServiceActor ¶
type ServiceActor struct {
// contains filtered or unexported fields
}
ServiceActor represents a service-to-service caller identity (machine principal). It is used when X-Principal-Type: service is injected by the gateway.
func NewServiceActor ¶
func NewServiceActor(id, displayName string) *ServiceActor
NewServiceActor creates a ServiceActor with the canonical three-piece identity.
func (*ServiceActor) DisplayName ¶
func (s *ServiceActor) DisplayName() string
func (*ServiceActor) ID ¶
func (s *ServiceActor) ID() string
func (*ServiceActor) Type ¶
func (s *ServiceActor) Type() Type
type SystemActor ¶
type SystemActor struct {
// contains filtered or unexported fields
}
SystemActor represents a non-user, non-service framework / platform principal (e.g. cron jobs, internal background processes).
func NewSystemActor ¶
func NewSystemActor(id, serviceName string) *SystemActor
NewSystemActor creates a SystemActor. id is the fully-qualified principal (e.g. "system:my-service"). serviceName 即 DisplayName 语义。
func (*SystemActor) DisplayName ¶
func (s *SystemActor) DisplayName() string
func (*SystemActor) ID ¶
func (s *SystemActor) ID() string
func (*SystemActor) Type ¶
func (s *SystemActor) Type() Type
type Type ¶
type Type string
Type identifies the kind of request initiator (generic identity, not domain model).
type UserActor ¶
type UserActor struct {
// contains filtered or unexported fields
}
UserActor is the concrete actor for an authenticated user.
func NewUserActor ¶
NewUserActor creates a UserActor with the canonical three-piece identity.