auth

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UserCredential_CredentialType_name = map[int32]string{
		0: "PASSWORD",
	}
	UserCredential_CredentialType_value = map[string]int32{
		"PASSWORD": 0,
	}
)

Enum value maps for UserCredential_CredentialType.

View Source
var File_goblog_auth_v1_resources_proto protoreflect.FileDescriptor
View Source
var File_goblog_auth_v1_service_proto protoreflect.FileDescriptor

Functions

func RegisterAuthServiceServer

func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)

Types

type AuthServiceClient

type AuthServiceClient interface {
	CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*User, error)
	UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*User, error)
	DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*User, error)
	ListUsers(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (AuthService_ListUsersClient, error)
	LoginUser(ctx context.Context, in *LoginUserRequest, opts ...grpc.CallOption) (*LoginUserResponse, error)
	RenewToken(ctx context.Context, in *RenewTokenRequest, opts ...grpc.CallOption) (*RenewTokenResponse, error)
	LogoutUser(ctx context.Context, in *LogoutUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

AuthServiceClient is the client API for AuthService 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 AuthServiceServer

type AuthServiceServer interface {
	CreateUser(context.Context, *CreateUserRequest) (*User, error)
	UpdateUser(context.Context, *UpdateUserRequest) (*User, error)
	DeleteUser(context.Context, *DeleteUserRequest) (*emptypb.Empty, error)
	GetUser(context.Context, *GetUserRequest) (*User, error)
	ListUsers(*emptypb.Empty, AuthService_ListUsersServer) error
	LoginUser(context.Context, *LoginUserRequest) (*LoginUserResponse, error)
	RenewToken(context.Context, *RenewTokenRequest) (*RenewTokenResponse, error)
	LogoutUser(context.Context, *LogoutUserRequest) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

AuthServiceServer is the server API for AuthService service. All implementations must embed UnimplementedAuthServiceServer for forward compatibility

type AuthService_ListUsersClient

type AuthService_ListUsersClient interface {
	Recv() (*User, error)
	grpc.ClientStream
}

type AuthService_ListUsersServer

type AuthService_ListUsersServer interface {
	Send(*User) error
	grpc.ServerStream
}

type CreateUserRequest

type CreateUserRequest struct {
	Email          string                        `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	CredentialType UserCredential_CredentialType `` /* 154-byte string literal not displayed */
	Credential     string                        `protobuf:"bytes,3,opt,name=credential,proto3" json:"credential,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateUserRequest) Descriptor deprecated

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

Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead.

func (*CreateUserRequest) GetCredential

func (x *CreateUserRequest) GetCredential() string

func (*CreateUserRequest) GetCredentialType

func (x *CreateUserRequest) GetCredentialType() UserCredential_CredentialType

func (*CreateUserRequest) GetEmail

func (x *CreateUserRequest) GetEmail() string

func (*CreateUserRequest) ProtoMessage

func (*CreateUserRequest) ProtoMessage()

func (*CreateUserRequest) ProtoReflect

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

func (*CreateUserRequest) Reset

func (x *CreateUserRequest) Reset()

func (*CreateUserRequest) String

func (x *CreateUserRequest) String() string

type DeleteUserRequest

type DeleteUserRequest struct {
	Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteUserRequest) Descriptor deprecated

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

Deprecated: Use DeleteUserRequest.ProtoReflect.Descriptor instead.

func (*DeleteUserRequest) GetEmail

func (x *DeleteUserRequest) GetEmail() string

func (*DeleteUserRequest) ProtoMessage

func (*DeleteUserRequest) ProtoMessage()

func (*DeleteUserRequest) ProtoReflect

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

func (*DeleteUserRequest) Reset

func (x *DeleteUserRequest) Reset()

func (*DeleteUserRequest) String

func (x *DeleteUserRequest) String() string

type GetUserRequest

type GetUserRequest struct {
	Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserRequest) Descriptor deprecated

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

Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead.

func (*GetUserRequest) GetEmail

func (x *GetUserRequest) GetEmail() string

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 LoginUserRequest

type LoginUserRequest struct {
	Email          string                        `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	CredentialType UserCredential_CredentialType `` /* 154-byte string literal not displayed */
	Credential     string                        `protobuf:"bytes,3,opt,name=credential,proto3" json:"credential,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginUserRequest) Descriptor deprecated

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

Deprecated: Use LoginUserRequest.ProtoReflect.Descriptor instead.

func (*LoginUserRequest) GetCredential

func (x *LoginUserRequest) GetCredential() string

func (*LoginUserRequest) GetCredentialType

func (x *LoginUserRequest) GetCredentialType() UserCredential_CredentialType

func (*LoginUserRequest) GetEmail

func (x *LoginUserRequest) GetEmail() string

func (*LoginUserRequest) ProtoMessage

func (*LoginUserRequest) ProtoMessage()

func (*LoginUserRequest) ProtoReflect

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

func (*LoginUserRequest) Reset

func (x *LoginUserRequest) Reset()

func (*LoginUserRequest) String

func (x *LoginUserRequest) String() string

type LoginUserResponse

type LoginUserResponse struct {
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginUserResponse) Descriptor deprecated

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

Deprecated: Use LoginUserResponse.ProtoReflect.Descriptor instead.

func (*LoginUserResponse) GetToken

func (x *LoginUserResponse) GetToken() string

func (*LoginUserResponse) ProtoMessage

func (*LoginUserResponse) ProtoMessage()

func (*LoginUserResponse) ProtoReflect

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

func (*LoginUserResponse) Reset

func (x *LoginUserResponse) Reset()

func (*LoginUserResponse) String

func (x *LoginUserResponse) String() string

type LogoutUserRequest

type LogoutUserRequest struct {
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

func (*LogoutUserRequest) Descriptor deprecated

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

Deprecated: Use LogoutUserRequest.ProtoReflect.Descriptor instead.

func (*LogoutUserRequest) GetToken

func (x *LogoutUserRequest) GetToken() string

func (*LogoutUserRequest) ProtoMessage

func (*LogoutUserRequest) ProtoMessage()

func (*LogoutUserRequest) ProtoReflect

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

func (*LogoutUserRequest) Reset

func (x *LogoutUserRequest) Reset()

func (*LogoutUserRequest) String

func (x *LogoutUserRequest) String() string

type RenewTokenRequest

type RenewTokenRequest struct {
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

func (*RenewTokenRequest) Descriptor deprecated

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

Deprecated: Use RenewTokenRequest.ProtoReflect.Descriptor instead.

func (*RenewTokenRequest) GetToken

func (x *RenewTokenRequest) GetToken() string

func (*RenewTokenRequest) ProtoMessage

func (*RenewTokenRequest) ProtoMessage()

func (*RenewTokenRequest) ProtoReflect

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

func (*RenewTokenRequest) Reset

func (x *RenewTokenRequest) Reset()

func (*RenewTokenRequest) String

func (x *RenewTokenRequest) String() string

type RenewTokenResponse

type RenewTokenResponse struct {
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

func (*RenewTokenResponse) Descriptor deprecated

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

Deprecated: Use RenewTokenResponse.ProtoReflect.Descriptor instead.

func (*RenewTokenResponse) GetToken

func (x *RenewTokenResponse) GetToken() string

func (*RenewTokenResponse) ProtoMessage

func (*RenewTokenResponse) ProtoMessage()

func (*RenewTokenResponse) ProtoReflect

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

func (*RenewTokenResponse) Reset

func (x *RenewTokenResponse) Reset()

func (*RenewTokenResponse) String

func (x *RenewTokenResponse) String() string

type UnimplementedAuthServiceServer

type UnimplementedAuthServiceServer struct {
}

UnimplementedAuthServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedAuthServiceServer) CreateUser

func (UnimplementedAuthServiceServer) DeleteUser

func (UnimplementedAuthServiceServer) GetUser

func (UnimplementedAuthServiceServer) ListUsers

func (UnimplementedAuthServiceServer) LoginUser

func (UnimplementedAuthServiceServer) LogoutUser

func (UnimplementedAuthServiceServer) RenewToken

func (UnimplementedAuthServiceServer) UpdateUser

type UnsafeAuthServiceServer

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

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

type UpdateUserRequest

type UpdateUserRequest struct {
	Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateUserRequest) Descriptor deprecated

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

Deprecated: Use UpdateUserRequest.ProtoReflect.Descriptor instead.

func (*UpdateUserRequest) GetEmail

func (x *UpdateUserRequest) GetEmail() string

func (*UpdateUserRequest) ProtoMessage

func (*UpdateUserRequest) ProtoMessage()

func (*UpdateUserRequest) ProtoReflect

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

func (*UpdateUserRequest) Reset

func (x *UpdateUserRequest) Reset()

func (*UpdateUserRequest) String

func (x *UpdateUserRequest) String() string

type User

type User struct {
	Email     string                 `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetCreatedAt

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

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetUpdatedAt

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

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 UserCredential

type UserCredential struct {
	Email      string                        `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	Type       UserCredential_CredentialType `protobuf:"varint,2,opt,name=type,proto3,enum=goblog.auth.v1.UserCredential_CredentialType" json:"type,omitempty"`
	Credential string                        `protobuf:"bytes,3,opt,name=credential,proto3" json:"credential,omitempty"`
	CreatedAt  *timestamppb.Timestamp        `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt  *timestamppb.Timestamp        `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

func (*UserCredential) Descriptor deprecated

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

Deprecated: Use UserCredential.ProtoReflect.Descriptor instead.

func (*UserCredential) GetCreatedAt

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

func (*UserCredential) GetCredential

func (x *UserCredential) GetCredential() string

func (*UserCredential) GetEmail

func (x *UserCredential) GetEmail() string

func (*UserCredential) GetType

func (*UserCredential) GetUpdatedAt

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

func (*UserCredential) ProtoMessage

func (*UserCredential) ProtoMessage()

func (*UserCredential) ProtoReflect

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

func (*UserCredential) Reset

func (x *UserCredential) Reset()

func (*UserCredential) String

func (x *UserCredential) String() string

type UserCredential_CredentialType

type UserCredential_CredentialType int32
const (
	UserCredential_PASSWORD UserCredential_CredentialType = 0
)

func (UserCredential_CredentialType) Descriptor

func (UserCredential_CredentialType) Enum

func (UserCredential_CredentialType) EnumDescriptor deprecated

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

Deprecated: Use UserCredential_CredentialType.Descriptor instead.

func (UserCredential_CredentialType) Number

func (UserCredential_CredentialType) String

func (UserCredential_CredentialType) Type

type UserSession

type UserSession struct {
	Email     string                 `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	Token     string                 `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	ExpireAt  *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=expire_at,json=expireAt,proto3" json:"expire_at,omitempty"`
	// contains filtered or unexported fields
}

func (*UserSession) Descriptor deprecated

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

Deprecated: Use UserSession.ProtoReflect.Descriptor instead.

func (*UserSession) GetCreatedAt

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

func (*UserSession) GetEmail

func (x *UserSession) GetEmail() string

func (*UserSession) GetExpireAt

func (x *UserSession) GetExpireAt() *timestamppb.Timestamp

func (*UserSession) GetToken

func (x *UserSession) GetToken() string

func (*UserSession) ProtoMessage

func (*UserSession) ProtoMessage()

func (*UserSession) ProtoReflect

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

func (*UserSession) Reset

func (x *UserSession) Reset()

func (*UserSession) String

func (x *UserSession) String() string

Jump to

Keyboard shortcuts

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