userv1beta1

package
v0.0.0-...-3ad35d1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2024 License: Apache-2.0 Imports: 10 Imported by: 202

Documentation

Index

Constants

View Source
const (
	UserAPI_GetUser_FullMethodName        = "/cs3.identity.user.v1beta1.UserAPI/GetUser"
	UserAPI_GetUserByClaim_FullMethodName = "/cs3.identity.user.v1beta1.UserAPI/GetUserByClaim"
	UserAPI_GetUserGroups_FullMethodName  = "/cs3.identity.user.v1beta1.UserAPI/GetUserGroups"
	UserAPI_FindUsers_FullMethodName      = "/cs3.identity.user.v1beta1.UserAPI/FindUsers"
)

Variables

View Source
var (
	UserType_name = map[int32]string{
		0: "USER_TYPE_INVALID",
		1: "USER_TYPE_PRIMARY",
		2: "USER_TYPE_SECONDARY",
		3: "USER_TYPE_SERVICE",
		4: "USER_TYPE_APPLICATION",
		5: "USER_TYPE_GUEST",
		6: "USER_TYPE_FEDERATED",
		7: "USER_TYPE_LIGHTWEIGHT",
		8: "USER_TYPE_SPACE_OWNER",
	}
	UserType_value = map[string]int32{
		"USER_TYPE_INVALID":     0,
		"USER_TYPE_PRIMARY":     1,
		"USER_TYPE_SECONDARY":   2,
		"USER_TYPE_SERVICE":     3,
		"USER_TYPE_APPLICATION": 4,
		"USER_TYPE_GUEST":       5,
		"USER_TYPE_FEDERATED":   6,
		"USER_TYPE_LIGHTWEIGHT": 7,
		"USER_TYPE_SPACE_OWNER": 8,
	}
)

Enum value maps for UserType.

View Source
var File_cs3_identity_user_v1beta1_resources_proto protoreflect.FileDescriptor
View Source
var File_cs3_identity_user_v1beta1_user_api_proto protoreflect.FileDescriptor
View Source
var UserAPI_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "cs3.identity.user.v1beta1.UserAPI",
	HandlerType: (*UserAPIServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetUser",
			Handler:    _UserAPI_GetUser_Handler,
		},
		{
			MethodName: "GetUserByClaim",
			Handler:    _UserAPI_GetUserByClaim_Handler,
		},
		{
			MethodName: "GetUserGroups",
			Handler:    _UserAPI_GetUserGroups_Handler,
		},
		{
			MethodName: "FindUsers",
			Handler:    _UserAPI_FindUsers_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "cs3/identity/user/v1beta1/user_api.proto",
}

UserAPI_ServiceDesc is the grpc.ServiceDesc for UserAPI service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterUserAPIServer

func RegisterUserAPIServer(s grpc.ServiceRegistrar, srv UserAPIServer)

Types

type FindUsersRequest

type FindUsersRequest struct {

	// OPTIONAL.
	// Opaque information.
	Opaque *v1beta1.Opaque `protobuf:"bytes,1,opt,name=opaque,proto3" json:"opaque,omitempty"`
	// REQUIRED. TODO(labkode): create proper filters for most common searches.
	// The filter to apply.
	Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"`
	// OPTIONAL.
	// Whether to skip fetching user groups along with the user object.
	SkipFetchingUserGroups bool `` /* 132-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*FindUsersRequest) Descriptor deprecated

func (*FindUsersRequest) Descriptor() ([]byte, []int)

Deprecated: Use FindUsersRequest.ProtoReflect.Descriptor instead.

func (*FindUsersRequest) GetFilter

func (x *FindUsersRequest) GetFilter() string

func (*FindUsersRequest) GetOpaque

func (x *FindUsersRequest) GetOpaque() *v1beta1.Opaque

func (*FindUsersRequest) GetSkipFetchingUserGroups

func (x *FindUsersRequest) GetSkipFetchingUserGroups() bool

func (*FindUsersRequest) ProtoMessage

func (*FindUsersRequest) ProtoMessage()

func (*FindUsersRequest) ProtoReflect

func (x *FindUsersRequest) ProtoReflect() protoreflect.Message

func (*FindUsersRequest) Reset

func (x *FindUsersRequest) Reset()

func (*FindUsersRequest) String

func (x *FindUsersRequest) String() string

type FindUsersResponse

type FindUsersResponse struct {

	// REQUIRED.
	// The response status.
	Status *v1beta11.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// OPTIONAL.
	// Opaque information.
	Opaque *v1beta1.Opaque `protobuf:"bytes,2,opt,name=opaque,proto3" json:"opaque,omitempty"`
	// REQUIRED.
	// The users matching the specified filter.
	Users []*User `protobuf:"bytes,3,rep,name=users,proto3" json:"users,omitempty"`
	// contains filtered or unexported fields
}

func (*FindUsersResponse) Descriptor deprecated

func (*FindUsersResponse) Descriptor() ([]byte, []int)

Deprecated: Use FindUsersResponse.ProtoReflect.Descriptor instead.

func (*FindUsersResponse) GetOpaque

func (x *FindUsersResponse) GetOpaque() *v1beta1.Opaque

func (*FindUsersResponse) GetStatus

func (x *FindUsersResponse) GetStatus() *v1beta11.Status

func (*FindUsersResponse) GetUsers

func (x *FindUsersResponse) GetUsers() []*User

func (*FindUsersResponse) ProtoMessage

func (*FindUsersResponse) ProtoMessage()

func (*FindUsersResponse) ProtoReflect

func (x *FindUsersResponse) ProtoReflect() protoreflect.Message

func (*FindUsersResponse) Reset

func (x *FindUsersResponse) Reset()

func (*FindUsersResponse) String

func (x *FindUsersResponse) String() string

type GetUserByClaimRequest

type GetUserByClaimRequest struct {

	// OPTIONAL.
	// Opaque information.
	Opaque *v1beta1.Opaque `protobuf:"bytes,1,opt,name=opaque,proto3" json:"opaque,omitempty"`
	// REQUIRED.
	// The claim on the basis of which users will be filtered.
	Claim string `protobuf:"bytes,2,opt,name=claim,proto3" json:"claim,omitempty"`
	// REQUIRED.
	// The value of the claim to find the specific user.
	Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	// OPTIONAL.
	// Whether to skip fetching user groups along with the user object.
	SkipFetchingUserGroups bool `` /* 132-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*GetUserByClaimRequest) Descriptor deprecated

func (*GetUserByClaimRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetUserByClaimRequest.ProtoReflect.Descriptor instead.

func (*GetUserByClaimRequest) GetClaim

func (x *GetUserByClaimRequest) GetClaim() string

func (*GetUserByClaimRequest) GetOpaque

func (x *GetUserByClaimRequest) GetOpaque() *v1beta1.Opaque

func (*GetUserByClaimRequest) GetSkipFetchingUserGroups

func (x *GetUserByClaimRequest) GetSkipFetchingUserGroups() bool

func (*GetUserByClaimRequest) GetValue

func (x *GetUserByClaimRequest) GetValue() string

func (*GetUserByClaimRequest) ProtoMessage

func (*GetUserByClaimRequest) ProtoMessage()

func (*GetUserByClaimRequest) ProtoReflect

func (x *GetUserByClaimRequest) ProtoReflect() protoreflect.Message

func (*GetUserByClaimRequest) Reset

func (x *GetUserByClaimRequest) Reset()

func (*GetUserByClaimRequest) String

func (x *GetUserByClaimRequest) String() string

type GetUserByClaimResponse

type GetUserByClaimResponse struct {

	// REQUIRED.
	// The response status.
	Status *v1beta11.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// OPTIONAL.
	// Opaque information.
	Opaque *v1beta1.Opaque `protobuf:"bytes,2,opt,name=opaque,proto3" json:"opaque,omitempty"`
	// REQUIRED.
	// The user information.
	User *User `protobuf:"bytes,3,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserByClaimResponse) Descriptor deprecated

func (*GetUserByClaimResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetUserByClaimResponse.ProtoReflect.Descriptor instead.

func (*GetUserByClaimResponse) GetOpaque

func (x *GetUserByClaimResponse) GetOpaque() *v1beta1.Opaque

func (*GetUserByClaimResponse) GetStatus

func (x *GetUserByClaimResponse) GetStatus() *v1beta11.Status

func (*GetUserByClaimResponse) GetUser

func (x *GetUserByClaimResponse) GetUser() *User

func (*GetUserByClaimResponse) ProtoMessage

func (*GetUserByClaimResponse) ProtoMessage()

func (*GetUserByClaimResponse) ProtoReflect

func (x *GetUserByClaimResponse) ProtoReflect() protoreflect.Message

func (*GetUserByClaimResponse) Reset

func (x *GetUserByClaimResponse) Reset()

func (*GetUserByClaimResponse) String

func (x *GetUserByClaimResponse) String() string

type GetUserGroupsRequest

type GetUserGroupsRequest struct {

	// OPTIONAL.
	// Opaque information.
	Opaque *v1beta1.Opaque `protobuf:"bytes,1,opt,name=opaque,proto3" json:"opaque,omitempty"`
	// REQUIRED.
	// The id of the user.
	UserId *UserId `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserGroupsRequest) Descriptor deprecated

func (*GetUserGroupsRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetUserGroupsRequest.ProtoReflect.Descriptor instead.

func (*GetUserGroupsRequest) GetOpaque

func (x *GetUserGroupsRequest) GetOpaque() *v1beta1.Opaque

func (*GetUserGroupsRequest) GetUserId

func (x *GetUserGroupsRequest) GetUserId() *UserId

func (*GetUserGroupsRequest) ProtoMessage

func (*GetUserGroupsRequest) ProtoMessage()

func (*GetUserGroupsRequest) ProtoReflect

func (x *GetUserGroupsRequest) ProtoReflect() protoreflect.Message

func (*GetUserGroupsRequest) Reset

func (x *GetUserGroupsRequest) Reset()

func (*GetUserGroupsRequest) String

func (x *GetUserGroupsRequest) String() string

type GetUserGroupsResponse

type GetUserGroupsResponse struct {

	// REQUIRED.
	// The response status.
	Status *v1beta11.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// OPTIONAL.
	// Opaque information.
	Opaque *v1beta1.Opaque `protobuf:"bytes,2,opt,name=opaque,proto3" json:"opaque,omitempty"`
	// REQUIRED.
	// The groups for the user.
	Groups []string `protobuf:"bytes,3,rep,name=groups,proto3" json:"groups,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserGroupsResponse) Descriptor deprecated

func (*GetUserGroupsResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetUserGroupsResponse.ProtoReflect.Descriptor instead.

func (*GetUserGroupsResponse) GetGroups

func (x *GetUserGroupsResponse) GetGroups() []string

func (*GetUserGroupsResponse) GetOpaque

func (x *GetUserGroupsResponse) GetOpaque() *v1beta1.Opaque

func (*GetUserGroupsResponse) GetStatus

func (x *GetUserGroupsResponse) GetStatus() *v1beta11.Status

func (*GetUserGroupsResponse) ProtoMessage

func (*GetUserGroupsResponse) ProtoMessage()

func (*GetUserGroupsResponse) ProtoReflect

func (x *GetUserGroupsResponse) ProtoReflect() protoreflect.Message

func (*GetUserGroupsResponse) Reset

func (x *GetUserGroupsResponse) Reset()

func (*GetUserGroupsResponse) String

func (x *GetUserGroupsResponse) String() string

type GetUserRequest

type GetUserRequest struct {

	// OPTIONAL.
	// Opaque information.
	Opaque *v1beta1.Opaque `protobuf:"bytes,1,opt,name=opaque,proto3" json:"opaque,omitempty"`
	// REQUIRED.
	// The id of the user.
	UserId *UserId `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// OPTIONAL.
	// Whether to skip fetching user groups along with the user object.
	SkipFetchingUserGroups bool `` /* 132-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*GetUserRequest) Descriptor deprecated

func (*GetUserRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead.

func (*GetUserRequest) GetOpaque

func (x *GetUserRequest) GetOpaque() *v1beta1.Opaque

func (*GetUserRequest) GetSkipFetchingUserGroups

func (x *GetUserRequest) GetSkipFetchingUserGroups() bool

func (*GetUserRequest) GetUserId

func (x *GetUserRequest) GetUserId() *UserId

func (*GetUserRequest) ProtoMessage

func (*GetUserRequest) ProtoMessage()

func (*GetUserRequest) ProtoReflect

func (x *GetUserRequest) ProtoReflect() protoreflect.Message

func (*GetUserRequest) Reset

func (x *GetUserRequest) Reset()

func (*GetUserRequest) String

func (x *GetUserRequest) String() string

type GetUserResponse

type GetUserResponse struct {

	// REQUIRED.
	// The response status.
	Status *v1beta11.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// OPTIONAL.
	// Opaque information.
	Opaque *v1beta1.Opaque `protobuf:"bytes,2,opt,name=opaque,proto3" json:"opaque,omitempty"`
	// REQUIRED.
	// The user information.
	User *User `protobuf:"bytes,3,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserResponse) Descriptor deprecated

func (*GetUserResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetUserResponse.ProtoReflect.Descriptor instead.

func (*GetUserResponse) GetOpaque

func (x *GetUserResponse) GetOpaque() *v1beta1.Opaque

func (*GetUserResponse) GetStatus

func (x *GetUserResponse) GetStatus() *v1beta11.Status

func (*GetUserResponse) GetUser

func (x *GetUserResponse) GetUser() *User

func (*GetUserResponse) ProtoMessage

func (*GetUserResponse) ProtoMessage()

func (*GetUserResponse) ProtoReflect

func (x *GetUserResponse) ProtoReflect() protoreflect.Message

func (*GetUserResponse) Reset

func (x *GetUserResponse) Reset()

func (*GetUserResponse) String

func (x *GetUserResponse) String() string

type UnimplementedUserAPIServer

type UnimplementedUserAPIServer struct {
}

UnimplementedUserAPIServer should be embedded to have forward compatible implementations.

func (UnimplementedUserAPIServer) FindUsers

func (UnimplementedUserAPIServer) GetUser

func (UnimplementedUserAPIServer) GetUserByClaim

func (UnimplementedUserAPIServer) GetUserGroups

type UnsafeUserAPIServer

type UnsafeUserAPIServer interface {
	// contains filtered or unexported methods
}

UnsafeUserAPIServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserAPIServer will result in compilation errors.

type User

type User struct {

	// REQUIRED.
	// The unique identifier of this user.
	Id *UserId `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// REQUIRED.
	// A human-friendly unique identifier of this user.
	Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	// OPTIONAL.
	// The e-mail address of this user.
	Mail string `protobuf:"bytes,3,opt,name=mail,proto3" json:"mail,omitempty"`
	// OPTIONAL.
	// Whether the e-mail address was verified by the IDP.
	MailVerified bool `protobuf:"varint,4,opt,name=mail_verified,json=mailVerified,proto3" json:"mail_verified,omitempty"`
	// OPTIONAL.
	// A human-friendly display name for this user, e.g. "Family and First Name"
	DisplayName string `protobuf:"bytes,5,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
	// OPTIONAL.
	// A list of groups this user belongs to.
	Groups []string `protobuf:"bytes,6,rep,name=groups,proto3" json:"groups,omitempty"`
	// OPTIONAL.
	// Opaque information.
	Opaque *v1beta1.Opaque `protobuf:"bytes,7,opt,name=opaque,proto3" json:"opaque,omitempty"`
	// OPTIONAL.
	// The user id of this user in the Unix world.
	UidNumber int64 `protobuf:"varint,8,opt,name=uid_number,json=uidNumber,proto3" json:"uid_number,omitempty"`
	// OPTIONAL.
	// The group id of this user in the Unix world.
	GidNumber int64 `protobuf:"varint,9,opt,name=gid_number,json=gidNumber,proto3" json:"gid_number,omitempty"`
	// contains filtered or unexported fields
}

Represents a user of the system.

func (*User) Descriptor deprecated

func (*User) Descriptor() ([]byte, []int)

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetDisplayName

func (x *User) GetDisplayName() string

func (*User) GetGidNumber

func (x *User) GetGidNumber() int64

func (*User) GetGroups

func (x *User) GetGroups() []string

func (*User) GetId

func (x *User) GetId() *UserId

func (*User) GetMail

func (x *User) GetMail() string

func (*User) GetMailVerified

func (x *User) GetMailVerified() bool

func (*User) GetOpaque

func (x *User) GetOpaque() *v1beta1.Opaque

func (*User) GetUidNumber

func (x *User) GetUidNumber() int64

func (*User) GetUsername

func (x *User) GetUsername() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

func (x *User) ProtoReflect() protoreflect.Message

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

type UserAPIClient

type UserAPIClient interface {
	// Gets the information about a user by the user id.
	GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error)
	// Gets the information about a user based on a specified claim.
	GetUserByClaim(ctx context.Context, in *GetUserByClaimRequest, opts ...grpc.CallOption) (*GetUserByClaimResponse, error)
	// Gets the groups of a user.
	GetUserGroups(ctx context.Context, in *GetUserGroupsRequest, opts ...grpc.CallOption) (*GetUserGroupsResponse, error)
	// Finds users by any attribute of the user.
	// TODO(labkode): to define the filters that make more sense.
	FindUsers(ctx context.Context, in *FindUsersRequest, opts ...grpc.CallOption) (*FindUsersResponse, error)
}

UserAPIClient is the client API for UserAPI service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewUserAPIClient

func NewUserAPIClient(cc grpc.ClientConnInterface) UserAPIClient

type UserAPIServer

type UserAPIServer interface {
	// Gets the information about a user by the user id.
	GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error)
	// Gets the information about a user based on a specified claim.
	GetUserByClaim(context.Context, *GetUserByClaimRequest) (*GetUserByClaimResponse, error)
	// Gets the groups of a user.
	GetUserGroups(context.Context, *GetUserGroupsRequest) (*GetUserGroupsResponse, error)
	// Finds users by any attribute of the user.
	// TODO(labkode): to define the filters that make more sense.
	FindUsers(context.Context, *FindUsersRequest) (*FindUsersResponse, error)
}

UserAPIServer is the server API for UserAPI service. All implementations should embed UnimplementedUserAPIServer for forward compatibility

type UserId

type UserId struct {

	// REQUIRED.
	// The identity provider for the user.
	Idp string `protobuf:"bytes,1,opt,name=idp,proto3" json:"idp,omitempty"`
	// REQUIRED.
	// the unique identifier for the user in the scope of
	// the identity provider.
	OpaqueId string `protobuf:"bytes,2,opt,name=opaque_id,json=opaqueId,proto3" json:"opaque_id,omitempty"`
	// REQUIRED.
	// The type of user.
	Type UserType `protobuf:"varint,3,opt,name=type,proto3,enum=cs3.identity.user.v1beta1.UserType" json:"type,omitempty"`
	// contains filtered or unexported fields
}

A UserId represents a unique identifier of a user.

func (*UserId) Descriptor deprecated

func (*UserId) Descriptor() ([]byte, []int)

Deprecated: Use UserId.ProtoReflect.Descriptor instead.

func (*UserId) GetIdp

func (x *UserId) GetIdp() string

func (*UserId) GetOpaqueId

func (x *UserId) GetOpaqueId() string

func (*UserId) GetType

func (x *UserId) GetType() UserType

func (*UserId) ProtoMessage

func (*UserId) ProtoMessage()

func (*UserId) ProtoReflect

func (x *UserId) ProtoReflect() protoreflect.Message

func (*UserId) Reset

func (x *UserId) Reset()

func (*UserId) String

func (x *UserId) String() string

type UserType

type UserType int32

The type of user.

const (
	// The user is invalid, for example, is missing primary attributes.
	UserType_USER_TYPE_INVALID UserType = 0
	// A primary user.
	UserType_USER_TYPE_PRIMARY UserType = 1
	// A secondary user for cases with multiple identities.
	UserType_USER_TYPE_SECONDARY UserType = 2
	// A user catering to specific services.
	UserType_USER_TYPE_SERVICE UserType = 3
	// A user to be used by specific applications.
	UserType_USER_TYPE_APPLICATION UserType = 4
	// A guest user not affiliated to the IDP.
	UserType_USER_TYPE_GUEST UserType = 5
	// A federated user provided by external IDPs.
	UserType_USER_TYPE_FEDERATED UserType = 6
	// A lightweight user account without access to various major functionalities.
	UserType_USER_TYPE_LIGHTWEIGHT UserType = 7
	// A space owner to allow access for public link or content indexing.
	UserType_USER_TYPE_SPACE_OWNER UserType = 8
)

func (UserType) Descriptor

func (UserType) Descriptor() protoreflect.EnumDescriptor

func (UserType) Enum

func (x UserType) Enum() *UserType

func (UserType) EnumDescriptor deprecated

func (UserType) EnumDescriptor() ([]byte, []int)

Deprecated: Use UserType.Descriptor instead.

func (UserType) Number

func (x UserType) Number() protoreflect.EnumNumber

func (UserType) String

func (x UserType) String() string

func (UserType) Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL