api

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: May 29, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package api describes microservice auth's gRPC API.

Package api is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	Access_Role_name = map[int32]string{
		0: "ROLE_UNSPECIFIED",
		1: "ROLE_ADMIN",
		2: "ROLE_USER",
	}
	Access_Role_value = map[string]int32{
		"ROLE_UNSPECIFIED": 0,
		"ROLE_ADMIN":       1,
		"ROLE_USER":        2,
	}
)

Enum value maps for Access_Role.

View Source
var AuthIntSvc_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "powerman.example.auth.AuthIntSvc",
	HandlerType: (*AuthIntSvcServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CheckAccessToken",
			Handler:    _AuthIntSvc_CheckAccessToken_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "powerman/example/auth/service_int.proto",
}

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

View Source
var AuthSvc_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "powerman.example.auth.AuthSvc",
	HandlerType: (*AuthSvcServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SignoutIdentity",
			Handler:    _AuthSvc_SignoutIdentity_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "powerman/example/auth/service.proto",
}

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

View Source
var File_powerman_example_auth_service_int_proto protoreflect.FileDescriptor
View Source
var File_powerman_example_auth_service_proto protoreflect.FileDescriptor
View Source
var NoAuthSvc_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "powerman.example.auth.NoAuthSvc",
	HandlerType: (*NoAuthSvcServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateAccount",
			Handler:    _NoAuthSvc_CreateAccount_Handler,
		},
		{
			MethodName: "SigninIdentity",
			Handler:    _NoAuthSvc_SigninIdentity_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "powerman/example/auth/service.proto",
}

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

Functions

func RegisterAuthIntSvcServer

func RegisterAuthIntSvcServer(s grpc.ServiceRegistrar, srv AuthIntSvcServer)

func RegisterAuthSvcHandler

func RegisterAuthSvcHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterAuthSvcHandler registers the http handlers for service AuthSvc to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterAuthSvcHandlerClient

func RegisterAuthSvcHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthSvcClient) error

RegisterAuthSvcHandlerClient registers the http handlers for service AuthSvc to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AuthSvcClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AuthSvcClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AuthSvcClient" to call the correct interceptors.

func RegisterAuthSvcHandlerFromEndpoint

func RegisterAuthSvcHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterAuthSvcHandlerFromEndpoint is same as RegisterAuthSvcHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterAuthSvcHandlerServer

func RegisterAuthSvcHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthSvcServer) error

RegisterAuthSvcHandlerServer registers the http handlers for service AuthSvc to "mux". UnaryRPC :call AuthSvcServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAuthSvcHandlerFromEndpoint instead.

func RegisterAuthSvcServer

func RegisterAuthSvcServer(s grpc.ServiceRegistrar, srv AuthSvcServer)

func RegisterNoAuthSvcHandler

func RegisterNoAuthSvcHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterNoAuthSvcHandler registers the http handlers for service NoAuthSvc to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterNoAuthSvcHandlerClient

func RegisterNoAuthSvcHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NoAuthSvcClient) error

RegisterNoAuthSvcHandlerClient registers the http handlers for service NoAuthSvc to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "NoAuthSvcClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "NoAuthSvcClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "NoAuthSvcClient" to call the correct interceptors.

func RegisterNoAuthSvcHandlerFromEndpoint

func RegisterNoAuthSvcHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterNoAuthSvcHandlerFromEndpoint is same as RegisterNoAuthSvcHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterNoAuthSvcHandlerServer

func RegisterNoAuthSvcHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NoAuthSvcServer) error

RegisterNoAuthSvcHandlerServer registers the http handlers for service NoAuthSvc to "mux". UnaryRPC :call NoAuthSvcServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterNoAuthSvcHandlerFromEndpoint instead.

func RegisterNoAuthSvcServer

func RegisterNoAuthSvcServer(s grpc.ServiceRegistrar, srv NoAuthSvcServer)

Types

type Access

type Access struct {

	// User's role.
	Role Access_Role `protobuf:"varint,1,opt,name=role,proto3,enum=powerman.example.auth.Access_Role" json:"role,omitempty"`
	// contains filtered or unexported fields
}

Access describes identity's permissions.

func (*Access) Descriptor deprecated

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

Deprecated: Use Access.ProtoReflect.Descriptor instead.

func (*Access) GetRole

func (x *Access) GetRole() Access_Role

func (*Access) ProtoMessage

func (*Access) ProtoMessage()

func (*Access) ProtoReflect

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

func (*Access) Reset

func (x *Access) Reset()

func (*Access) String

func (x *Access) String() string

type Access_Role

type Access_Role int32

Possible roles for a user. New values may be added in the future.

const (
	// Default value. This value is unused.
	Access_ROLE_UNSPECIFIED Access_Role = 0
	// Full access to everything.
	Access_ROLE_ADMIN Access_Role = 1
	// Full access only to user's own data.
	// Read-only access to user's Access.
	Access_ROLE_USER Access_Role = 2
)

func (Access_Role) Descriptor

func (Access_Role) Enum

func (x Access_Role) Enum() *Access_Role

func (Access_Role) EnumDescriptor deprecated

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

Deprecated: Use Access_Role.Descriptor instead.

func (Access_Role) Number

func (x Access_Role) Number() protoreflect.EnumNumber

func (Access_Role) String

func (x Access_Role) String() string

func (Access_Role) Type

type Account

type Account struct {

	// Format: "accounts/{account_id}".
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Default identity connected to the account.
	User *User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
	// Must be strong enough.
	Password string `protobuf:"bytes,16,opt,name=password,proto3" json:"password,omitempty"`
	// Primary email, needed to reset password.
	Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
	// Account create time.
	// Output only.
	CreateTime *timestamppb.Timestamp `protobuf:"bytes,15,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	// contains filtered or unexported fields
}

Account contains data needed for authentication.

func (*Account) Descriptor deprecated

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

Deprecated: Use Account.ProtoReflect.Descriptor instead.

func (*Account) GetCreateTime

func (x *Account) GetCreateTime() *timestamppb.Timestamp

func (*Account) GetEmail

func (x *Account) GetEmail() string

func (*Account) GetName

func (x *Account) GetName() string

func (*Account) GetPassword

func (x *Account) GetPassword() string

func (*Account) GetUser

func (x *Account) GetUser() *User

func (*Account) ProtoMessage

func (*Account) ProtoMessage()

func (*Account) ProtoReflect

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

func (*Account) Reset

func (x *Account) Reset()

func (*Account) String

func (x *Account) String() string

type AuthIntSvcClient

type AuthIntSvcClient interface {
	// Returns identity tied to access_token.
	CheckAccessToken(ctx context.Context, in *CheckAccessTokenRequest, opts ...grpc.CallOption) (*CheckAccessTokenResponse, error)
}

AuthIntSvcClient is the client API for AuthIntSvc 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 NewAuthIntSvcClient

func NewAuthIntSvcClient(cc grpc.ClientConnInterface) AuthIntSvcClient

type AuthIntSvcServer

type AuthIntSvcServer interface {
	// Returns identity tied to access_token.
	CheckAccessToken(context.Context, *CheckAccessTokenRequest) (*CheckAccessTokenResponse, error)
}

AuthIntSvcServer is the server API for AuthIntSvc service. All implementations should embed UnimplementedAuthIntSvcServer for forward compatibility

type AuthSvcClient

type AuthSvcClient interface {
	// Logout.
	//
	// Invalidates either current or all user's access_token.
	//
	// (-- api-linter: core::0136::verb-noun=disabled --)
	SignoutIdentity(ctx context.Context, in *SignoutIdentityRequest, opts ...grpc.CallOption) (*SignoutIdentityResponse, error)
}

AuthSvcClient is the client API for AuthSvc 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 NewAuthSvcClient

func NewAuthSvcClient(cc grpc.ClientConnInterface) AuthSvcClient

type AuthSvcServer

type AuthSvcServer interface {
	// Logout.
	//
	// Invalidates either current or all user's access_token.
	//
	// (-- api-linter: core::0136::verb-noun=disabled --)
	SignoutIdentity(context.Context, *SignoutIdentityRequest) (*SignoutIdentityResponse, error)
}

AuthSvcServer is the server API for AuthSvc service. All implementations should embed UnimplementedAuthSvcServer for forward compatibility

type CheckAccessTokenRequest

type CheckAccessTokenRequest struct {
	// contains filtered or unexported fields
}

Request.

func (*CheckAccessTokenRequest) Descriptor deprecated

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

Deprecated: Use CheckAccessTokenRequest.ProtoReflect.Descriptor instead.

func (*CheckAccessTokenRequest) ProtoMessage

func (*CheckAccessTokenRequest) ProtoMessage()

func (*CheckAccessTokenRequest) ProtoReflect

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

func (*CheckAccessTokenRequest) Reset

func (x *CheckAccessTokenRequest) Reset()

func (*CheckAccessTokenRequest) String

func (x *CheckAccessTokenRequest) String() string

type CheckAccessTokenResponse

type CheckAccessTokenResponse struct {

	// Identity tied to access_token.
	User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

Response.

func (*CheckAccessTokenResponse) Descriptor deprecated

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

Deprecated: Use CheckAccessTokenResponse.ProtoReflect.Descriptor instead.

func (*CheckAccessTokenResponse) GetUser

func (x *CheckAccessTokenResponse) GetUser() *User

func (*CheckAccessTokenResponse) ProtoMessage

func (*CheckAccessTokenResponse) ProtoMessage()

func (*CheckAccessTokenResponse) ProtoReflect

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

func (*CheckAccessTokenResponse) Reset

func (x *CheckAccessTokenResponse) Reset()

func (*CheckAccessTokenResponse) String

func (x *CheckAccessTokenResponse) String() string

type CreateAccountRequest

type CreateAccountRequest struct {

	// The account to create.
	Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	// The ID to use for the account.
	// This value should be 4-63 characters [a-z0-9-].
	AccountId string `protobuf:"bytes,2,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"`
	// contains filtered or unexported fields
}

Request.

func (*CreateAccountRequest) Descriptor deprecated

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

Deprecated: Use CreateAccountRequest.ProtoReflect.Descriptor instead.

func (*CreateAccountRequest) GetAccount

func (x *CreateAccountRequest) GetAccount() *Account

func (*CreateAccountRequest) GetAccountId

func (x *CreateAccountRequest) GetAccountId() string

func (*CreateAccountRequest) ProtoMessage

func (*CreateAccountRequest) ProtoMessage()

func (*CreateAccountRequest) ProtoReflect

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

func (*CreateAccountRequest) Reset

func (x *CreateAccountRequest) Reset()

func (*CreateAccountRequest) String

func (x *CreateAccountRequest) String() string

type NoAuthSvcClient

type NoAuthSvcClient interface {
	// Registers new user account.
	//
	// User can provide optional account_id (username).
	//
	// These fields will be ignored in input and set automatically:
	// account.name, account.user.name, account.user.access.
	//
	// If account_id=="admin" then user's role will be set to ROLE_ADMIN.
	//
	// XXX No email validation.
	CreateAccount(ctx context.Context, in *CreateAccountRequest, opts ...grpc.CallOption) (*Account, error)
	// Authenticates user by different credentials.
	//
	// Creates and returns access_token.
	// Also returns user's account details for convenience.
	SigninIdentity(ctx context.Context, in *SigninIdentityRequest, opts ...grpc.CallOption) (*SigninIdentityResponse, error)
}

NoAuthSvcClient is the client API for NoAuthSvc 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 NewNoAuthSvcClient

func NewNoAuthSvcClient(cc grpc.ClientConnInterface) NoAuthSvcClient

type NoAuthSvcServer

type NoAuthSvcServer interface {
	// Registers new user account.
	//
	// User can provide optional account_id (username).
	//
	// These fields will be ignored in input and set automatically:
	// account.name, account.user.name, account.user.access.
	//
	// If account_id=="admin" then user's role will be set to ROLE_ADMIN.
	//
	// XXX No email validation.
	CreateAccount(context.Context, *CreateAccountRequest) (*Account, error)
	// Authenticates user by different credentials.
	//
	// Creates and returns access_token.
	// Also returns user's account details for convenience.
	SigninIdentity(context.Context, *SigninIdentityRequest) (*SigninIdentityResponse, error)
}

NoAuthSvcServer is the server API for NoAuthSvc service. All implementations should embed UnimplementedNoAuthSvcServer for forward compatibility

type SigninIdentityRequest

type SigninIdentityRequest struct {

	// Different ways to authenticate.
	//
	// Types that are assignable to Auth:
	//	*SigninIdentityRequest_Account
	//	*SigninIdentityRequest_Email
	Auth isSigninIdentityRequest_Auth `protobuf_oneof:"auth"`
	// contains filtered or unexported fields
}

Request.

func (*SigninIdentityRequest) Descriptor deprecated

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

Deprecated: Use SigninIdentityRequest.ProtoReflect.Descriptor instead.

func (*SigninIdentityRequest) GetAccount

func (*SigninIdentityRequest) GetAuth

func (m *SigninIdentityRequest) GetAuth() isSigninIdentityRequest_Auth

func (*SigninIdentityRequest) GetEmail

func (*SigninIdentityRequest) ProtoMessage

func (*SigninIdentityRequest) ProtoMessage()

func (*SigninIdentityRequest) ProtoReflect

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

func (*SigninIdentityRequest) Reset

func (x *SigninIdentityRequest) Reset()

func (*SigninIdentityRequest) String

func (x *SigninIdentityRequest) String() string

type SigninIdentityRequest_Account

type SigninIdentityRequest_Account struct {
	// By username.
	Account *SigninIdentityRequest_AccountAuth `protobuf:"bytes,1,opt,name=account,proto3,oneof"`
}

type SigninIdentityRequest_AccountAuth

type SigninIdentityRequest_AccountAuth struct {

	// This value should be 4-63 characters [a-z0-9-].
	AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"`
	// Any value.
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

Authentication using username and password.

func (*SigninIdentityRequest_AccountAuth) Descriptor deprecated

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

Deprecated: Use SigninIdentityRequest_AccountAuth.ProtoReflect.Descriptor instead.

func (*SigninIdentityRequest_AccountAuth) GetAccountId

func (x *SigninIdentityRequest_AccountAuth) GetAccountId() string

func (*SigninIdentityRequest_AccountAuth) GetPassword

func (x *SigninIdentityRequest_AccountAuth) GetPassword() string

func (*SigninIdentityRequest_AccountAuth) ProtoMessage

func (*SigninIdentityRequest_AccountAuth) ProtoMessage()

func (*SigninIdentityRequest_AccountAuth) ProtoReflect

func (*SigninIdentityRequest_AccountAuth) Reset

func (*SigninIdentityRequest_AccountAuth) String

type SigninIdentityRequest_Email

type SigninIdentityRequest_Email struct {
	// By email.
	Email *SigninIdentityRequest_EmailAuth `protobuf:"bytes,2,opt,name=email,proto3,oneof"`
}

type SigninIdentityRequest_EmailAuth

type SigninIdentityRequest_EmailAuth struct {

	// This value should contain [@].
	Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	// Any value.
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

Authentication user email and password.

func (*SigninIdentityRequest_EmailAuth) Descriptor deprecated

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

Deprecated: Use SigninIdentityRequest_EmailAuth.ProtoReflect.Descriptor instead.

func (*SigninIdentityRequest_EmailAuth) GetEmail

func (*SigninIdentityRequest_EmailAuth) GetPassword

func (x *SigninIdentityRequest_EmailAuth) GetPassword() string

func (*SigninIdentityRequest_EmailAuth) ProtoMessage

func (*SigninIdentityRequest_EmailAuth) ProtoMessage()

func (*SigninIdentityRequest_EmailAuth) ProtoReflect

func (*SigninIdentityRequest_EmailAuth) Reset

func (*SigninIdentityRequest_EmailAuth) String

type SigninIdentityResponse

type SigninIdentityResponse struct {

	// Opaque.
	AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
	// User/Access details.
	User *User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

Response.

func (*SigninIdentityResponse) Descriptor deprecated

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

Deprecated: Use SigninIdentityResponse.ProtoReflect.Descriptor instead.

func (*SigninIdentityResponse) GetAccessToken

func (x *SigninIdentityResponse) GetAccessToken() string

func (*SigninIdentityResponse) GetUser

func (x *SigninIdentityResponse) GetUser() *User

func (*SigninIdentityResponse) ProtoMessage

func (*SigninIdentityResponse) ProtoMessage()

func (*SigninIdentityResponse) ProtoReflect

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

func (*SigninIdentityResponse) Reset

func (x *SigninIdentityResponse) Reset()

func (*SigninIdentityResponse) String

func (x *SigninIdentityResponse) String() string

type SignoutIdentityRequest

type SignoutIdentityRequest struct {

	// Set to true to invalidate all user's access_token.
	Everywhere bool `protobuf:"varint,1,opt,name=everywhere,proto3" json:"everywhere,omitempty"`
	// contains filtered or unexported fields
}

Request.

func (*SignoutIdentityRequest) Descriptor deprecated

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

Deprecated: Use SignoutIdentityRequest.ProtoReflect.Descriptor instead.

func (*SignoutIdentityRequest) GetEverywhere

func (x *SignoutIdentityRequest) GetEverywhere() bool

func (*SignoutIdentityRequest) ProtoMessage

func (*SignoutIdentityRequest) ProtoMessage()

func (*SignoutIdentityRequest) ProtoReflect

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

func (*SignoutIdentityRequest) Reset

func (x *SignoutIdentityRequest) Reset()

func (*SignoutIdentityRequest) String

func (x *SignoutIdentityRequest) String() string

type SignoutIdentityResponse

type SignoutIdentityResponse struct {
	// contains filtered or unexported fields
}

Response.

func (*SignoutIdentityResponse) Descriptor deprecated

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

Deprecated: Use SignoutIdentityResponse.ProtoReflect.Descriptor instead.

func (*SignoutIdentityResponse) ProtoMessage

func (*SignoutIdentityResponse) ProtoMessage()

func (*SignoutIdentityResponse) ProtoReflect

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

func (*SignoutIdentityResponse) Reset

func (x *SignoutIdentityResponse) Reset()

func (*SignoutIdentityResponse) String

func (x *SignoutIdentityResponse) String() string

type UnimplementedAuthIntSvcServer

type UnimplementedAuthIntSvcServer struct {
}

UnimplementedAuthIntSvcServer should be embedded to have forward compatible implementations.

func (UnimplementedAuthIntSvcServer) CheckAccessToken

type UnimplementedAuthSvcServer

type UnimplementedAuthSvcServer struct {
}

UnimplementedAuthSvcServer should be embedded to have forward compatible implementations.

func (UnimplementedAuthSvcServer) SignoutIdentity

type UnimplementedNoAuthSvcServer

type UnimplementedNoAuthSvcServer struct {
}

UnimplementedNoAuthSvcServer should be embedded to have forward compatible implementations.

func (UnimplementedNoAuthSvcServer) CreateAccount

func (UnimplementedNoAuthSvcServer) SigninIdentity

type UnsafeAuthIntSvcServer

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

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

type UnsafeAuthSvcServer

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

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

type UnsafeNoAuthSvcServer

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

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

type User

type User struct {

	// Format: "users/{user_uid}".
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// By default set to {account_id}.
	DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
	// Permissions.
	Access *Access `protobuf:"bytes,3,opt,name=access,proto3" json:"access,omitempty"`
	// contains filtered or unexported fields
}

User is an identity tied to Account.

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetAccess

func (x *User) GetAccess() *Access

func (*User) GetDisplayName

func (x *User) GetDisplayName() string

func (*User) GetName

func (x *User) GetName() 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

Jump to

Keyboard shortcuts

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