accounts

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2021 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Accounts_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "users.Accounts",
	HandlerType: (*AccountsServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Create",
			Handler:    _Accounts_Create_Handler,
		},
		{
			MethodName: "UpdateUser",
			Handler:    _Accounts_UpdateUser_Handler,
		},
		{
			MethodName: "UpdatePassword",
			Handler:    _Accounts_UpdatePassword_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _Accounts_Get_Handler,
		},
		{
			MethodName: "AddAppToUser",
			Handler:    _Accounts_AddAppToUser_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "List",
			Handler:       _Accounts_List_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "users/accounts/accounts_v1.proto",
}

Accounts_ServiceDesc is the grpc.ServiceDesc for Accounts 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_users_accounts_accounts_v1_proto protoreflect.FileDescriptor

Functions

func RegisterAccountsServer

func RegisterAccountsServer(s grpc.ServiceRegistrar, srv AccountsServer)

Types

type AccountCreds

type AccountCreds struct {
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` // username: unix-like
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // Password
	// contains filtered or unexported fields
}

* Represents credentials (username and password)

func (*AccountCreds) Descriptor deprecated

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

Deprecated: Use AccountCreds.ProtoReflect.Descriptor instead.

func (*AccountCreds) GetPassword

func (x *AccountCreds) GetPassword() string

func (*AccountCreds) GetUsername

func (x *AccountCreds) GetUsername() string

func (*AccountCreds) ProtoMessage

func (*AccountCreds) ProtoMessage()

func (*AccountCreds) ProtoReflect

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

func (*AccountCreds) Reset

func (x *AccountCreds) Reset()

func (*AccountCreds) String

func (x *AccountCreds) String() string

type AccountId

type AccountId struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // UUID
	// contains filtered or unexported fields
}

* Represents Account ID only

func (*AccountId) Descriptor deprecated

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

Deprecated: Use AccountId.ProtoReflect.Descriptor instead.

func (*AccountId) GetId

func (x *AccountId) GetId() string

func (*AccountId) ProtoMessage

func (*AccountId) ProtoMessage()

func (*AccountId) ProtoReflect

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

func (*AccountId) Reset

func (x *AccountId) Reset()

func (*AccountId) String

func (x *AccountId) String() string

type AccountInfo

type AccountInfo struct {
	Id          string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`             // UUID
	Username    string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` // username: unix-like
	GitlabToken string `protobuf:"bytes,3,opt,name=gitlab_token,json=gitlabToken,proto3" json:"gitlab_token,omitempty"`
	// contains filtered or unexported fields
}

* Represents the Account without sensitive data

func (*AccountInfo) Descriptor deprecated

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

Deprecated: Use AccountInfo.ProtoReflect.Descriptor instead.

func (*AccountInfo) GetGitlabToken added in v0.0.3

func (x *AccountInfo) GetGitlabToken() string

func (*AccountInfo) GetId

func (x *AccountInfo) GetId() string

func (*AccountInfo) GetUsername

func (x *AccountInfo) GetUsername() string

func (*AccountInfo) ProtoMessage

func (*AccountInfo) ProtoMessage()

func (*AccountInfo) ProtoReflect

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

func (*AccountInfo) Reset

func (x *AccountInfo) Reset()

func (*AccountInfo) String

func (x *AccountInfo) String() string

type AccountInfoWithSensitive

type AccountInfoWithSensitive struct {
	Id          string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`             // UUID
	Username    string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` // username: unix-like
	Password    string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` // Password
	GitlabToken string `protobuf:"bytes,4,opt,name=gitlab_token,json=gitlabToken,proto3" json:"gitlab_token,omitempty"`
	// contains filtered or unexported fields
}

func (*AccountInfoWithSensitive) Descriptor deprecated

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

Deprecated: Use AccountInfoWithSensitive.ProtoReflect.Descriptor instead.

func (*AccountInfoWithSensitive) GetGitlabToken added in v0.0.3

func (x *AccountInfoWithSensitive) GetGitlabToken() string

func (*AccountInfoWithSensitive) GetId

func (x *AccountInfoWithSensitive) GetId() string

func (*AccountInfoWithSensitive) GetPassword

func (x *AccountInfoWithSensitive) GetPassword() string

func (*AccountInfoWithSensitive) GetUsername

func (x *AccountInfoWithSensitive) GetUsername() string

func (*AccountInfoWithSensitive) ProtoMessage

func (*AccountInfoWithSensitive) ProtoMessage()

func (*AccountInfoWithSensitive) ProtoReflect

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

func (*AccountInfoWithSensitive) Reset

func (x *AccountInfoWithSensitive) Reset()

func (*AccountInfoWithSensitive) String

func (x *AccountInfoWithSensitive) String() string

type AccountName

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

* Represents username only

func (*AccountName) Descriptor deprecated

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

Deprecated: Use AccountName.ProtoReflect.Descriptor instead.

func (*AccountName) GetUsername

func (x *AccountName) GetUsername() string

func (*AccountName) ProtoMessage

func (*AccountName) ProtoMessage()

func (*AccountName) ProtoReflect

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

func (*AccountName) Reset

func (x *AccountName) Reset()

func (*AccountName) String

func (x *AccountName) String() string

type AccountsClient

type AccountsClient interface {
	/// Use to create a Account
	Create(ctx context.Context, in *AccountCreds, opts ...grpc.CallOption) (*AccountInfo, error)
	/// Use to update a Account
	UpdateUser(ctx context.Context, in *AccountInfo, opts ...grpc.CallOption) (*AccountInfo, error)
	UpdatePassword(ctx context.Context, in *PasswordUpdate, opts ...grpc.CallOption) (*common.EmptyMessage, error)
	/// Account to get a Account by ID
	Get(ctx context.Context, in *AccountId, opts ...grpc.CallOption) (*AccountInfo, error)
	/// List Accounts
	List(ctx context.Context, in *AccountName, opts ...grpc.CallOption) (Accounts_ListClient, error)
	/// Add an app to the user app list
	AddAppToUser(ctx context.Context, in *applications.AppId, opts ...grpc.CallOption) (*common.EmptyMessage, error)
}

AccountsClient is the client API for Accounts 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 NewAccountsClient

func NewAccountsClient(cc grpc.ClientConnInterface) AccountsClient

type AccountsServer

type AccountsServer interface {
	/// Use to create a Account
	Create(context.Context, *AccountCreds) (*AccountInfo, error)
	/// Use to update a Account
	UpdateUser(context.Context, *AccountInfo) (*AccountInfo, error)
	UpdatePassword(context.Context, *PasswordUpdate) (*common.EmptyMessage, error)
	/// Account to get a Account by ID
	Get(context.Context, *AccountId) (*AccountInfo, error)
	/// List Accounts
	List(*AccountName, Accounts_ListServer) error
	/// Add an app to the user app list
	AddAppToUser(context.Context, *applications.AppId) (*common.EmptyMessage, error)
	// contains filtered or unexported methods
}

AccountsServer is the server API for Accounts service. All implementations must embed UnimplementedAccountsServer for forward compatibility

type Accounts_ListClient

type Accounts_ListClient interface {
	Recv() (*AccountInfo, error)
	grpc.ClientStream
}

type Accounts_ListServer

type Accounts_ListServer interface {
	Send(*AccountInfo) error
	grpc.ServerStream
}

type PasswordUpdate

type PasswordUpdate struct {
	Id          string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Username    string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	OldPassword string `protobuf:"bytes,3,opt,name=old_password,json=oldPassword,proto3" json:"old_password,omitempty"`
	NewPassword string `protobuf:"bytes,4,opt,name=new_password,json=newPassword,proto3" json:"new_password,omitempty"`
	// contains filtered or unexported fields
}

func (*PasswordUpdate) Descriptor deprecated

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

Deprecated: Use PasswordUpdate.ProtoReflect.Descriptor instead.

func (*PasswordUpdate) GetId

func (x *PasswordUpdate) GetId() string

func (*PasswordUpdate) GetNewPassword

func (x *PasswordUpdate) GetNewPassword() string

func (*PasswordUpdate) GetOldPassword

func (x *PasswordUpdate) GetOldPassword() string

func (*PasswordUpdate) GetUsername

func (x *PasswordUpdate) GetUsername() string

func (*PasswordUpdate) ProtoMessage

func (*PasswordUpdate) ProtoMessage()

func (*PasswordUpdate) ProtoReflect

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

func (*PasswordUpdate) Reset

func (x *PasswordUpdate) Reset()

func (*PasswordUpdate) String

func (x *PasswordUpdate) String() string

type UnimplementedAccountsServer

type UnimplementedAccountsServer struct {
}

UnimplementedAccountsServer must be embedded to have forward compatible implementations.

func (UnimplementedAccountsServer) AddAppToUser added in v0.0.3

func (UnimplementedAccountsServer) Create

func (UnimplementedAccountsServer) Get

func (UnimplementedAccountsServer) List

func (UnimplementedAccountsServer) UpdatePassword

func (UnimplementedAccountsServer) UpdateUser added in v0.0.3

type UnsafeAccountsServer

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

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

Jump to

Keyboard shortcuts

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