Documentation ¶
Overview ¶
Package user contains protobuf types for users.
Index ¶
- Variables
- func PutServiceAccount(ctx context.Context, client databroker.DataBrokerServiceClient, ...) (*databroker.PutResponse, error)
- type Claim
- type ServiceAccount
- func (*ServiceAccount) Descriptor() ([]byte, []int)deprecated
- func (x *ServiceAccount) GetAccessedAt() *timestamppb.Timestamp
- func (x *ServiceAccount) GetDescription() string
- func (x *ServiceAccount) GetExpiresAt() *timestamppb.Timestamp
- func (x *ServiceAccount) GetId() string
- func (x *ServiceAccount) GetIssuedAt() *timestamppb.Timestamp
- func (x *ServiceAccount) GetNamespaceId() string
- func (x *ServiceAccount) GetUserId() string
- func (*ServiceAccount) ProtoMessage()
- func (x *ServiceAccount) ProtoReflect() protoreflect.Message
- func (x *ServiceAccount) Reset()
- func (x *ServiceAccount) String() string
- type User
- func (x *User) AddClaims(claims identity.FlattenedClaims)
- func (x *User) AddDeviceCredentialID(deviceCredentialID string)
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetClaim(claim string) []interface{}
- func (x *User) GetClaims() map[string]*structpb.ListValue
- func (x *User) GetDeviceCredentialIds() []string
- func (x *User) GetEmail() string
- func (x *User) GetId() string
- func (x *User) GetName() string
- func (x *User) GetVersion() string
- func (x *User) HasDeviceCredentialID(deviceCredentialID string) bool
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) RemoveDeviceCredentialID(deviceCredentialID string)
- func (x *User) Reset()
- func (x *User) String() string
Constants ¶
This section is empty.
Variables ¶
var File_user_proto protoreflect.FileDescriptor
Functions ¶
func PutServiceAccount ¶ added in v0.14.0
func PutServiceAccount(ctx context.Context, client databroker.DataBrokerServiceClient, serviceAccount *ServiceAccount) (*databroker.PutResponse, error)
PutServiceAccount saves a service account to the databroker.
Types ¶
type Claim ¶ added in v0.11.0
type Claim struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Values []string `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"` // contains filtered or unexported fields }
func (*Claim) Descriptor
deprecated
added in
v0.11.0
func (*Claim) ProtoMessage ¶ added in v0.11.0
func (*Claim) ProtoMessage()
func (*Claim) ProtoReflect ¶ added in v0.11.0
func (x *Claim) ProtoReflect() protoreflect.Message
type ServiceAccount ¶ added in v0.11.0
type ServiceAccount struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` NamespaceId *string `protobuf:"bytes,8,opt,name=namespace_id,json=namespaceId,proto3,oneof" json:"namespace_id,omitempty"` Description *string `protobuf:"bytes,9,opt,name=description,proto3,oneof" json:"description,omitempty"` UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` IssuedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=issued_at,json=issuedAt,proto3" json:"issued_at,omitempty"` AccessedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=accessed_at,json=accessedAt,proto3" json:"accessed_at,omitempty"` // contains filtered or unexported fields }
func GetServiceAccount ¶ added in v0.17.3
func GetServiceAccount(ctx context.Context, client databroker.DataBrokerServiceClient, serviceAccountID string) (*ServiceAccount, error)
GetServiceAccount gets a service account from the databroker.
func (*ServiceAccount) Descriptor
deprecated
added in
v0.11.0
func (*ServiceAccount) Descriptor() ([]byte, []int)
Deprecated: Use ServiceAccount.ProtoReflect.Descriptor instead.
func (*ServiceAccount) GetAccessedAt ¶ added in v0.17.3
func (x *ServiceAccount) GetAccessedAt() *timestamppb.Timestamp
func (*ServiceAccount) GetDescription ¶ added in v0.15.6
func (x *ServiceAccount) GetDescription() string
func (*ServiceAccount) GetExpiresAt ¶ added in v0.11.0
func (x *ServiceAccount) GetExpiresAt() *timestamppb.Timestamp
func (*ServiceAccount) GetId ¶ added in v0.11.0
func (x *ServiceAccount) GetId() string
func (*ServiceAccount) GetIssuedAt ¶ added in v0.11.0
func (x *ServiceAccount) GetIssuedAt() *timestamppb.Timestamp
func (*ServiceAccount) GetNamespaceId ¶ added in v0.15.0
func (x *ServiceAccount) GetNamespaceId() string
func (*ServiceAccount) GetUserId ¶ added in v0.11.0
func (x *ServiceAccount) GetUserId() string
func (*ServiceAccount) ProtoMessage ¶ added in v0.11.0
func (*ServiceAccount) ProtoMessage()
func (*ServiceAccount) ProtoReflect ¶ added in v0.11.0
func (x *ServiceAccount) ProtoReflect() protoreflect.Message
func (*ServiceAccount) Reset ¶ added in v0.11.0
func (x *ServiceAccount) Reset()
func (*ServiceAccount) String ¶ added in v0.11.0
func (x *ServiceAccount) String() string
type User ¶
type User struct { Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"` Claims map[string]*structpb.ListValue `` /* 153-byte string literal not displayed */ DeviceCredentialIds []string `protobuf:"bytes,10,rep,name=device_credential_ids,json=deviceCredentialIds,proto3" json:"device_credential_ids,omitempty"` // contains filtered or unexported fields }
func Get ¶
func Get(ctx context.Context, client databroker.DataBrokerServiceClient, userID string) (*User, error)
Get gets a user from the databroker.
func (*User) AddClaims ¶ added in v0.11.0
func (x *User) AddClaims(claims identity.FlattenedClaims)
AddClaims adds the flattened claims to the user.
func (*User) AddDeviceCredentialID ¶ added in v0.20.0
AddDeviceCredentialID adds a device credential id to the list of device credential ids.
func (*User) Descriptor
deprecated
func (*User) GetClaim ¶
GetClaim returns a claim.
This method is used by the dashboard template HTML to display claim data.
func (*User) GetDeviceCredentialIds ¶ added in v0.15.6
func (*User) GetVersion ¶
func (*User) HasDeviceCredentialID ¶ added in v0.20.0
HasDeviceCredentialID returns true if the user has the device credential id.
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
func (*User) RemoveDeviceCredentialID ¶ added in v0.20.0
RemoveDeviceCredentialID removes the device credential id from the list of device credential ids.