identity

package
v0.0.0-...-522cb6f Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: BSD-2-Clause Imports: 15 Imported by: 7

Documentation

Index

Constants

View Source
const (
	IdentityService_GetIdentityFromProvider_FullMethodName = "/dictybase.identity.IdentityService/GetIdentityFromProvider"
	IdentityService_GetIdentity_FullMethodName             = "/dictybase.identity.IdentityService/GetIdentity"
	IdentityService_ExistProviderIdentity_FullMethodName   = "/dictybase.identity.IdentityService/ExistProviderIdentity"
	IdentityService_CreateIdentity_FullMethodName          = "/dictybase.identity.IdentityService/CreateIdentity"
	IdentityService_DeleteIdentity_FullMethodName          = "/dictybase.identity.IdentityService/DeleteIdentity"
	IdentityService_Healthz_FullMethodName                 = "/dictybase.identity.IdentityService/Healthz"
)

Variables

View Source
var File_dictybase_identity_identity_proto protoreflect.FileDescriptor
View Source
var IdentityService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "dictybase.identity.IdentityService",
	HandlerType: (*IdentityServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetIdentityFromProvider",
			Handler:    _IdentityService_GetIdentityFromProvider_Handler,
		},
		{
			MethodName: "GetIdentity",
			Handler:    _IdentityService_GetIdentity_Handler,
		},
		{
			MethodName: "ExistProviderIdentity",
			Handler:    _IdentityService_ExistProviderIdentity_Handler,
		},
		{
			MethodName: "CreateIdentity",
			Handler:    _IdentityService_CreateIdentity_Handler,
		},
		{
			MethodName: "DeleteIdentity",
			Handler:    _IdentityService_DeleteIdentity_Handler,
		},
		{
			MethodName: "Healthz",
			Handler:    _IdentityService_Healthz_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "dictybase/identity/identity.proto",
}

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

Functions

func RegisterIdentityServiceServer

func RegisterIdentityServiceServer(s grpc.ServiceRegistrar, srv IdentityServiceServer)

Types

type CreateIdentityReq

type CreateIdentityReq struct {
	Data *CreateIdentityReq_Data `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateIdentityReq) Descriptor deprecated

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

Deprecated: Use CreateIdentityReq.ProtoReflect.Descriptor instead.

func (*CreateIdentityReq) GetData

func (*CreateIdentityReq) ProtoMessage

func (*CreateIdentityReq) ProtoMessage()

func (*CreateIdentityReq) ProtoReflect

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

func (*CreateIdentityReq) Reset

func (x *CreateIdentityReq) Reset()

func (*CreateIdentityReq) String

func (x *CreateIdentityReq) String() string

func (*CreateIdentityReq) Validate

func (this *CreateIdentityReq) Validate() error

type CreateIdentityReq_Data

type CreateIdentityReq_Data struct {

	// resource name
	Type       string                 `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	Attributes *NewIdentityAttributes `protobuf:"bytes,2,opt,name=attributes,proto3" json:"attributes,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateIdentityReq_Data) Descriptor deprecated

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

Deprecated: Use CreateIdentityReq_Data.ProtoReflect.Descriptor instead.

func (*CreateIdentityReq_Data) GetAttributes

func (x *CreateIdentityReq_Data) GetAttributes() *NewIdentityAttributes

func (*CreateIdentityReq_Data) GetType

func (x *CreateIdentityReq_Data) GetType() string

func (*CreateIdentityReq_Data) ProtoMessage

func (*CreateIdentityReq_Data) ProtoMessage()

func (*CreateIdentityReq_Data) ProtoReflect

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

func (*CreateIdentityReq_Data) Reset

func (x *CreateIdentityReq_Data) Reset()

func (*CreateIdentityReq_Data) String

func (x *CreateIdentityReq_Data) String() string

func (*CreateIdentityReq_Data) Validate

func (this *CreateIdentityReq_Data) Validate() error

type Identity

type Identity struct {
	Data  *IdentityData  `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	Links *jsonapi.Links `protobuf:"bytes,4,opt,name=links,proto3" json:"links,omitempty"`
	// contains filtered or unexported fields
}

func (*Identity) Descriptor deprecated

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

Deprecated: Use Identity.ProtoReflect.Descriptor instead.

func (*Identity) GetData

func (x *Identity) GetData() *IdentityData
func (x *Identity) GetLinks() *jsonapi.Links

func (*Identity) ProtoMessage

func (*Identity) ProtoMessage()

func (*Identity) ProtoReflect

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

func (*Identity) Reset

func (x *Identity) Reset()

func (*Identity) String

func (x *Identity) String() string

func (*Identity) Validate

func (this *Identity) Validate() error

type IdentityAttributes

type IdentityAttributes struct {

	// An unique identifier provided by the third party.
	// Generally it's an email id, however it could be something else specifically
	// provided by an provider.
	Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"`
	// Name of the provider, for example, orcid, google, facebook etc.
	Provider string `protobuf:"bytes,2,opt,name=provider,proto3" json:"provider,omitempty"`
	// The id of the user to which this identity is connected.
	// This id could be used to fetch a complete user response from the user service
	UserId int64 `protobuf:"varint,3,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// Timestamp for creation and update
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

Definition for various fields

func (*IdentityAttributes) Descriptor deprecated

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

Deprecated: Use IdentityAttributes.ProtoReflect.Descriptor instead.

func (*IdentityAttributes) GetCreatedAt

func (x *IdentityAttributes) GetCreatedAt() *timestamppb.Timestamp

func (*IdentityAttributes) GetIdentifier

func (x *IdentityAttributes) GetIdentifier() string

func (*IdentityAttributes) GetProvider

func (x *IdentityAttributes) GetProvider() string

func (*IdentityAttributes) GetUpdatedAt

func (x *IdentityAttributes) GetUpdatedAt() *timestamppb.Timestamp

func (*IdentityAttributes) GetUserId

func (x *IdentityAttributes) GetUserId() int64

func (*IdentityAttributes) ProtoMessage

func (*IdentityAttributes) ProtoMessage()

func (*IdentityAttributes) ProtoReflect

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

func (*IdentityAttributes) Reset

func (x *IdentityAttributes) Reset()

func (*IdentityAttributes) String

func (x *IdentityAttributes) String() string

func (*IdentityAttributes) Validate

func (this *IdentityAttributes) Validate() error

type IdentityData

type IdentityData struct {

	// The resource name
	Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	// Unique id
	Id         int64               `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
	Attributes *IdentityAttributes `protobuf:"bytes,3,opt,name=attributes,proto3" json:"attributes,omitempty"`
	Links      *jsonapi.Links      `protobuf:"bytes,4,opt,name=links,proto3" json:"links,omitempty"`
	// contains filtered or unexported fields
}

func (*IdentityData) Descriptor deprecated

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

Deprecated: Use IdentityData.ProtoReflect.Descriptor instead.

func (*IdentityData) GetAttributes

func (x *IdentityData) GetAttributes() *IdentityAttributes

func (*IdentityData) GetId

func (x *IdentityData) GetId() int64
func (x *IdentityData) GetLinks() *jsonapi.Links

func (*IdentityData) GetType

func (x *IdentityData) GetType() string

func (*IdentityData) ProtoMessage

func (*IdentityData) ProtoMessage()

func (*IdentityData) ProtoReflect

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

func (*IdentityData) Reset

func (x *IdentityData) Reset()

func (*IdentityData) String

func (x *IdentityData) String() string

func (*IdentityData) Validate

func (this *IdentityData) Validate() error

type IdentityProviderReq

type IdentityProviderReq struct {

	// An unique identifier provided by the third party.
	// Generally it's an email id, however it could be something else specifically
	// provided by an provider.
	Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"`
	// Name of the provider, for example, orcid, google, facebook etc.
	Provider string `protobuf:"bytes,2,opt,name=provider,proto3" json:"provider,omitempty"`
	// contains filtered or unexported fields
}

func (*IdentityProviderReq) Descriptor deprecated

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

Deprecated: Use IdentityProviderReq.ProtoReflect.Descriptor instead.

func (*IdentityProviderReq) GetIdentifier

func (x *IdentityProviderReq) GetIdentifier() string

func (*IdentityProviderReq) GetProvider

func (x *IdentityProviderReq) GetProvider() string

func (*IdentityProviderReq) ProtoMessage

func (*IdentityProviderReq) ProtoMessage()

func (*IdentityProviderReq) ProtoReflect

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

func (*IdentityProviderReq) Reset

func (x *IdentityProviderReq) Reset()

func (*IdentityProviderReq) String

func (x *IdentityProviderReq) String() string

func (*IdentityProviderReq) Validate

func (this *IdentityProviderReq) Validate() error

type IdentityServiceClient

type IdentityServiceClient interface {
	// Gets the specified identity
	GetIdentityFromProvider(ctx context.Context, in *IdentityProviderReq, opts ...grpc.CallOption) (*Identity, error)
	GetIdentity(ctx context.Context, in *jsonapi.IdRequest, opts ...grpc.CallOption) (*Identity, error)
	ExistProviderIdentity(ctx context.Context, in *IdentityProviderReq, opts ...grpc.CallOption) (*jsonapi.ExistResponse, error)
	// Create a new identity
	CreateIdentity(ctx context.Context, in *CreateIdentityReq, opts ...grpc.CallOption) (*Identity, error)
	// Delete an existing identity
	DeleteIdentity(ctx context.Context, in *jsonapi.IdRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Basic health check that always return success
	Healthz(ctx context.Context, in *jsonapi.HealthzIdRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

IdentityServiceClient is the client API for IdentityService 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.

type IdentityServiceServer

type IdentityServiceServer interface {
	// Gets the specified identity
	GetIdentityFromProvider(context.Context, *IdentityProviderReq) (*Identity, error)
	GetIdentity(context.Context, *jsonapi.IdRequest) (*Identity, error)
	ExistProviderIdentity(context.Context, *IdentityProviderReq) (*jsonapi.ExistResponse, error)
	// Create a new identity
	CreateIdentity(context.Context, *CreateIdentityReq) (*Identity, error)
	// Delete an existing identity
	DeleteIdentity(context.Context, *jsonapi.IdRequest) (*emptypb.Empty, error)
	// Basic health check that always return success
	Healthz(context.Context, *jsonapi.HealthzIdRequest) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

IdentityServiceServer is the server API for IdentityService service. All implementations must embed UnimplementedIdentityServiceServer for forward compatibility

type NewIdentityAttributes

type NewIdentityAttributes struct {

	// An unique identifier provided by the third party.
	// Generally it's an email id, however it could be something else specifically
	// provided by an provider.
	Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"`
	// Name of the provider, for example, orcid, google, facebook etc.
	Provider string `protobuf:"bytes,2,opt,name=provider,proto3" json:"provider,omitempty"`
	// The id of the user to which this identity is connected.
	// This id could be used to fetch a complete user response from the user service
	UserId int64 `protobuf:"varint,3,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// contains filtered or unexported fields
}

func (*NewIdentityAttributes) Descriptor deprecated

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

Deprecated: Use NewIdentityAttributes.ProtoReflect.Descriptor instead.

func (*NewIdentityAttributes) GetIdentifier

func (x *NewIdentityAttributes) GetIdentifier() string

func (*NewIdentityAttributes) GetProvider

func (x *NewIdentityAttributes) GetProvider() string

func (*NewIdentityAttributes) GetUserId

func (x *NewIdentityAttributes) GetUserId() int64

func (*NewIdentityAttributes) ProtoMessage

func (*NewIdentityAttributes) ProtoMessage()

func (*NewIdentityAttributes) ProtoReflect

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

func (*NewIdentityAttributes) Reset

func (x *NewIdentityAttributes) Reset()

func (*NewIdentityAttributes) String

func (x *NewIdentityAttributes) String() string

func (*NewIdentityAttributes) Validate

func (this *NewIdentityAttributes) Validate() error

type UnimplementedIdentityServiceServer

type UnimplementedIdentityServiceServer struct {
}

UnimplementedIdentityServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedIdentityServiceServer) CreateIdentity

func (UnimplementedIdentityServiceServer) DeleteIdentity

func (UnimplementedIdentityServiceServer) ExistProviderIdentity

func (UnimplementedIdentityServiceServer) GetIdentity

func (UnimplementedIdentityServiceServer) GetIdentityFromProvider

func (UnimplementedIdentityServiceServer) Healthz

type UnsafeIdentityServiceServer

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

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

Jump to

Keyboard shortcuts

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