rpc

package
v0.0.0-...-8dc6894 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2020 License: Unlicense Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Roles_name = map[int32]string{
		0: "INVALID",
		1: "GUEST",
		2: "USER",
		3: "ADMIN",
		4: "SUPERADMIN",
	}
	Roles_value = map[string]int32{
		"INVALID":    0,
		"GUEST":      1,
		"USER":       2,
		"ADMIN":      3,
		"SUPERADMIN": 4,
	}
)

Enum value maps for Roles.

View Source
var File_authn_proto protoreflect.FileDescriptor
View Source
var File_users_proto protoreflect.FileDescriptor

Functions

func AccountServiceClientCommand

func AccountServiceClientCommand(options ...client.Option) *cobra.Command

func AuthServiceClientCommand

func AuthServiceClientCommand(options ...client.Option) *cobra.Command

func RegisterAccountServiceService

func RegisterAccountServiceService(s grpc.ServiceRegistrar, srv *AccountServiceService)

RegisterAccountServiceService registers a service implementation with a gRPC server.

func RegisterAuthServiceService

func RegisterAuthServiceService(s grpc.ServiceRegistrar, srv *AuthServiceService)

RegisterAuthServiceService registers a service implementation with a gRPC server.

Types

type Account

type Account struct {
	Id        string               `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Email     string               `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
	Password  string               `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
	Role      *UserRoles           `protobuf:"bytes,4,opt,name=role,proto3" json:"role,omitempty"`
	CreatedAt *timestamp.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt *timestamp.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	LastLogin *timestamp.Timestamp `protobuf:"bytes,7,opt,name=last_login,json=lastLogin,proto3" json:"last_login,omitempty"`
	Disabled  bool                 `protobuf:"varint,8,opt,name=disabled,proto3" json:"disabled,omitempty"`
	Fields    *UserDefinedFields   `protobuf:"bytes,9,opt,name=fields,proto3" json:"fields,omitempty"`
	// contains filtered or unexported fields
}

func (*Account) Descriptor deprecated

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

Deprecated: Use Account.ProtoReflect.Descriptor instead.

func (*Account) GetCreatedAt

func (x *Account) GetCreatedAt() *timestamp.Timestamp

func (*Account) GetDisabled

func (x *Account) GetDisabled() bool

func (*Account) GetEmail

func (x *Account) GetEmail() string

func (*Account) GetFields

func (x *Account) GetFields() *UserDefinedFields

func (*Account) GetId

func (x *Account) GetId() string

func (*Account) GetLastLogin

func (x *Account) GetLastLogin() *timestamp.Timestamp

func (*Account) GetPassword

func (x *Account) GetPassword() string

func (*Account) GetRole

func (x *Account) GetRole() *UserRoles

func (*Account) GetUpdatedAt

func (x *Account) GetUpdatedAt() *timestamp.Timestamp

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 AccountServiceClient

type AccountServiceClient interface {
	NewAccount(ctx context.Context, in *Account, opts ...grpc.CallOption) (*Account, error)
	GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*Account, error)
	ListAccounts(ctx context.Context, in *ListAccountsRequest, opts ...grpc.CallOption) (*ListAccountsResponse, error)
	SearchAccounts(ctx context.Context, in *SearchAccountsRequest, opts ...grpc.CallOption) (*SearchAccountsResponse, error)
	AssignAccountToRole(ctx context.Context, in *AssignAccountToRoleRequest, opts ...grpc.CallOption) (*Account, error)
	UpdateAccount(ctx context.Context, in *Account, opts ...grpc.CallOption) (*Account, error)
	DisableAccount(ctx context.Context, in *DisableAccountRequest, opts ...grpc.CallOption) (*Account, error)
}

AccountServiceClient is the client API for AccountService service.

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

type AccountServiceService

type AccountServiceService struct {
	NewAccount          func(context.Context, *Account) (*Account, error)
	GetAccount          func(context.Context, *GetAccountRequest) (*Account, error)
	ListAccounts        func(context.Context, *ListAccountsRequest) (*ListAccountsResponse, error)
	SearchAccounts      func(context.Context, *SearchAccountsRequest) (*SearchAccountsResponse, error)
	AssignAccountToRole func(context.Context, *AssignAccountToRoleRequest) (*Account, error)
	UpdateAccount       func(context.Context, *Account) (*Account, error)
	DisableAccount      func(context.Context, *DisableAccountRequest) (*Account, error)
}

AccountServiceService is the service API for AccountService service. Fields should be assigned to their respective handler implementations only before RegisterAccountServiceService is called. Any unassigned fields will result in the handler for that method returning an Unimplemented error.

func NewAccountServiceService

func NewAccountServiceService(s interface{}) *AccountServiceService

NewAccountServiceService creates a new AccountServiceService containing the implemented methods of the AccountService service in s. Any unimplemented methods will result in the gRPC server returning an UNIMPLEMENTED status to the client. This includes situations where the method handler is misspelled or has the wrong signature. For this reason, this function should be used with great care and is not recommended to be used by most users.

type AssignAccountToRoleRequest

type AssignAccountToRoleRequest struct {
	AssigneeAccountId string     `protobuf:"bytes,1,opt,name=assignee_account_id,json=assigneeAccountId,proto3" json:"assignee_account_id,omitempty"` // current account's id (to check for privilege)
	AssignedAccountId string     `protobuf:"bytes,2,opt,name=assigned_account_id,json=assignedAccountId,proto3" json:"assigned_account_id,omitempty"` // account id to be assigned to role.
	Role              *UserRoles `protobuf:"bytes,3,opt,name=role,proto3" json:"role,omitempty"`
	// contains filtered or unexported fields
}

func (*AssignAccountToRoleRequest) Descriptor deprecated

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

Deprecated: Use AssignAccountToRoleRequest.ProtoReflect.Descriptor instead.

func (*AssignAccountToRoleRequest) GetAssignedAccountId

func (x *AssignAccountToRoleRequest) GetAssignedAccountId() string

func (*AssignAccountToRoleRequest) GetAssigneeAccountId

func (x *AssignAccountToRoleRequest) GetAssigneeAccountId() string

func (*AssignAccountToRoleRequest) GetRole

func (x *AssignAccountToRoleRequest) GetRole() *UserRoles

func (*AssignAccountToRoleRequest) ProtoMessage

func (*AssignAccountToRoleRequest) ProtoMessage()

func (*AssignAccountToRoleRequest) ProtoReflect

func (*AssignAccountToRoleRequest) Reset

func (x *AssignAccountToRoleRequest) Reset()

func (*AssignAccountToRoleRequest) String

func (x *AssignAccountToRoleRequest) String() string

type AuthServiceClient

type AuthServiceClient interface {
	Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error)
	Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)
	// ForgotPassword, then ResetPassword if succeed
	ForgotPassword(ctx context.Context, in *ForgotPasswordRequest, opts ...grpc.CallOption) (*ForgotPasswordResponse, error)
	ResetPassword(ctx context.Context, in *ResetPasswordRequest, opts ...grpc.CallOption) (*ResetPasswordResponse, error)
	// Refresh Access Token endpoint
	RefreshAccessToken(ctx context.Context, in *RefreshAccessTokenRequest, opts ...grpc.CallOption) (*RefreshAccessTokenResponse, error)
}

AuthServiceClient is the client API for AuthService service.

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

type AuthServiceService

type AuthServiceService struct {
	Register func(context.Context, *RegisterRequest) (*RegisterResponse, error)
	Login    func(context.Context, *LoginRequest) (*LoginResponse, error)
	// ForgotPassword, then ResetPassword if succeed
	ForgotPassword func(context.Context, *ForgotPasswordRequest) (*ForgotPasswordResponse, error)
	ResetPassword  func(context.Context, *ResetPasswordRequest) (*ResetPasswordResponse, error)
	// Refresh Access Token endpoint
	RefreshAccessToken func(context.Context, *RefreshAccessTokenRequest) (*RefreshAccessTokenResponse, error)
}

AuthServiceService is the service API for AuthService service. Fields should be assigned to their respective handler implementations only before RegisterAuthServiceService is called. Any unassigned fields will result in the handler for that method returning an Unimplemented error.

func NewAuthServiceService

func NewAuthServiceService(s interface{}) *AuthServiceService

NewAuthServiceService creates a new AuthServiceService containing the implemented methods of the AuthService service in s. Any unimplemented methods will result in the gRPC server returning an UNIMPLEMENTED status to the client. This includes situations where the method handler is misspelled or has the wrong signature. For this reason, this function should be used with great care and is not recommended to be used by most users.

type DisableAccountRequest

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

func (*DisableAccountRequest) Descriptor deprecated

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

Deprecated: Use DisableAccountRequest.ProtoReflect.Descriptor instead.

func (*DisableAccountRequest) GetAccountId

func (x *DisableAccountRequest) GetAccountId() string

func (*DisableAccountRequest) ProtoMessage

func (*DisableAccountRequest) ProtoMessage()

func (*DisableAccountRequest) ProtoReflect

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

func (*DisableAccountRequest) Reset

func (x *DisableAccountRequest) Reset()

func (*DisableAccountRequest) String

func (x *DisableAccountRequest) String() string

type ErrorReason

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

func (*ErrorReason) Descriptor deprecated

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

Deprecated: Use ErrorReason.ProtoReflect.Descriptor instead.

func (*ErrorReason) GetReason

func (x *ErrorReason) GetReason() string

func (*ErrorReason) ProtoMessage

func (*ErrorReason) ProtoMessage()

func (*ErrorReason) ProtoReflect

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

func (*ErrorReason) Reset

func (x *ErrorReason) Reset()

func (*ErrorReason) String

func (x *ErrorReason) String() string

type ForgotPasswordRequest

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

func (*ForgotPasswordRequest) Descriptor deprecated

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

Deprecated: Use ForgotPasswordRequest.ProtoReflect.Descriptor instead.

func (*ForgotPasswordRequest) GetEmail

func (x *ForgotPasswordRequest) GetEmail() string

func (*ForgotPasswordRequest) ProtoMessage

func (*ForgotPasswordRequest) ProtoMessage()

func (*ForgotPasswordRequest) ProtoReflect

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

func (*ForgotPasswordRequest) Reset

func (x *ForgotPasswordRequest) Reset()

func (*ForgotPasswordRequest) String

func (x *ForgotPasswordRequest) String() string

type ForgotPasswordResponse

type ForgotPasswordResponse struct {
	Success                   bool                 `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	SuccessMsg                string               `protobuf:"bytes,2,opt,name=success_msg,json=successMsg,proto3" json:"success_msg,omitempty"`
	ErrorReason               *ErrorReason         `protobuf:"bytes,3,opt,name=error_reason,json=errorReason,proto3" json:"error_reason,omitempty"`
	ForgotPasswordRequestedAt *timestamp.Timestamp `` /* 140-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ForgotPasswordResponse) Descriptor deprecated

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

Deprecated: Use ForgotPasswordResponse.ProtoReflect.Descriptor instead.

func (*ForgotPasswordResponse) GetErrorReason

func (x *ForgotPasswordResponse) GetErrorReason() *ErrorReason

func (*ForgotPasswordResponse) GetForgotPasswordRequestedAt

func (x *ForgotPasswordResponse) GetForgotPasswordRequestedAt() *timestamp.Timestamp

func (*ForgotPasswordResponse) GetSuccess

func (x *ForgotPasswordResponse) GetSuccess() bool

func (*ForgotPasswordResponse) GetSuccessMsg

func (x *ForgotPasswordResponse) GetSuccessMsg() string

func (*ForgotPasswordResponse) ProtoMessage

func (*ForgotPasswordResponse) ProtoMessage()

func (*ForgotPasswordResponse) ProtoReflect

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

func (*ForgotPasswordResponse) Reset

func (x *ForgotPasswordResponse) Reset()

func (*ForgotPasswordResponse) String

func (x *ForgotPasswordResponse) String() string

type GetAccountRequest

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

func (*GetAccountRequest) Descriptor deprecated

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

Deprecated: Use GetAccountRequest.ProtoReflect.Descriptor instead.

func (*GetAccountRequest) GetId

func (x *GetAccountRequest) GetId() string

func (*GetAccountRequest) ProtoMessage

func (*GetAccountRequest) ProtoMessage()

func (*GetAccountRequest) ProtoReflect

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

func (*GetAccountRequest) Reset

func (x *GetAccountRequest) Reset()

func (*GetAccountRequest) String

func (x *GetAccountRequest) String() string

type ListAccountsRequest

type ListAccountsRequest struct {

	// limit
	PerPageEntries int64  `protobuf:"varint,1,opt,name=per_page_entries,json=perPageEntries,proto3" json:"per_page_entries,omitempty"`
	OrderBy        string `protobuf:"bytes,2,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"`
	// number 3 => optional: current_page_token is the last id of the
	// (current) listed Accounts for pagination purpose (cursor).
	CurrentPageToken string `protobuf:"bytes,3,opt,name=current_page_token,json=currentPageToken,proto3" json:"current_page_token,omitempty"`
	// contains filtered or unexported fields
}

func (*ListAccountsRequest) Descriptor deprecated

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

Deprecated: Use ListAccountsRequest.ProtoReflect.Descriptor instead.

func (*ListAccountsRequest) GetCurrentPageToken

func (x *ListAccountsRequest) GetCurrentPageToken() string

func (*ListAccountsRequest) GetOrderBy

func (x *ListAccountsRequest) GetOrderBy() string

func (*ListAccountsRequest) GetPerPageEntries

func (x *ListAccountsRequest) GetPerPageEntries() int64

func (*ListAccountsRequest) ProtoMessage

func (*ListAccountsRequest) ProtoMessage()

func (*ListAccountsRequest) ProtoReflect

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

func (*ListAccountsRequest) Reset

func (x *ListAccountsRequest) Reset()

func (*ListAccountsRequest) String

func (x *ListAccountsRequest) String() string

type ListAccountsResponse

type ListAccountsResponse struct {
	Accounts []*Account `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"`
	// similarly, next_page token is the cursor for the next request
	NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	// contains filtered or unexported fields
}

func (*ListAccountsResponse) Descriptor deprecated

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

Deprecated: Use ListAccountsResponse.ProtoReflect.Descriptor instead.

func (*ListAccountsResponse) GetAccounts

func (x *ListAccountsResponse) GetAccounts() []*Account

func (*ListAccountsResponse) GetNextPageToken

func (x *ListAccountsResponse) GetNextPageToken() string

func (*ListAccountsResponse) ProtoMessage

func (*ListAccountsResponse) ProtoMessage()

func (*ListAccountsResponse) ProtoReflect

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

func (*ListAccountsResponse) Reset

func (x *ListAccountsResponse) Reset()

func (*ListAccountsResponse) String

func (x *ListAccountsResponse) String() string

type LoginRequest

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

func (*LoginRequest) Descriptor deprecated

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

Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.

func (*LoginRequest) GetEmail

func (x *LoginRequest) GetEmail() string

func (*LoginRequest) GetPassword

func (x *LoginRequest) GetPassword() string

func (*LoginRequest) ProtoMessage

func (*LoginRequest) ProtoMessage()

func (*LoginRequest) ProtoReflect

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

func (*LoginRequest) Reset

func (x *LoginRequest) Reset()

func (*LoginRequest) String

func (x *LoginRequest) String() string

type LoginResponse

type LoginResponse struct {
	Success      bool                 `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	AccessToken  string               `protobuf:"bytes,2,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
	RefreshToken string               `protobuf:"bytes,3,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"`
	ErrorReason  *ErrorReason         `protobuf:"bytes,4,opt,name=error_reason,json=errorReason,proto3" json:"error_reason,omitempty"`
	LastLogin    *timestamp.Timestamp `protobuf:"bytes,5,opt,name=last_login,json=lastLogin,proto3" json:"last_login,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginResponse) Descriptor deprecated

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

Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.

func (*LoginResponse) GetAccessToken

func (x *LoginResponse) GetAccessToken() string

func (*LoginResponse) GetErrorReason

func (x *LoginResponse) GetErrorReason() *ErrorReason

func (*LoginResponse) GetLastLogin

func (x *LoginResponse) GetLastLogin() *timestamp.Timestamp

func (*LoginResponse) GetRefreshToken

func (x *LoginResponse) GetRefreshToken() string

func (*LoginResponse) GetSuccess

func (x *LoginResponse) GetSuccess() bool

func (*LoginResponse) ProtoMessage

func (*LoginResponse) ProtoMessage()

func (*LoginResponse) ProtoReflect

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

func (*LoginResponse) Reset

func (x *LoginResponse) Reset()

func (*LoginResponse) String

func (x *LoginResponse) String() string

type Org

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

resource: Org

func (*Org) Descriptor deprecated

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

Deprecated: Use Org.ProtoReflect.Descriptor instead.

func (*Org) GetId

func (x *Org) GetId() string

func (*Org) ProtoMessage

func (*Org) ProtoMessage()

func (*Org) ProtoReflect

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

func (*Org) Reset

func (x *Org) Reset()

func (*Org) String

func (x *Org) String() string

type Project

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

resource: Project

func (*Project) Descriptor deprecated

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

Deprecated: Use Project.ProtoReflect.Descriptor instead.

func (*Project) GetId

func (x *Project) GetId() string

func (*Project) ProtoMessage

func (*Project) ProtoMessage()

func (*Project) ProtoReflect

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

func (*Project) Reset

func (x *Project) Reset()

func (*Project) String

func (x *Project) String() string

type RefreshAccessTokenRequest

type RefreshAccessTokenRequest struct {
	RefreshToken string `protobuf:"bytes,1,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"`
	// contains filtered or unexported fields
}

func (*RefreshAccessTokenRequest) Descriptor deprecated

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

Deprecated: Use RefreshAccessTokenRequest.ProtoReflect.Descriptor instead.

func (*RefreshAccessTokenRequest) GetRefreshToken

func (x *RefreshAccessTokenRequest) GetRefreshToken() string

func (*RefreshAccessTokenRequest) ProtoMessage

func (*RefreshAccessTokenRequest) ProtoMessage()

func (*RefreshAccessTokenRequest) ProtoReflect

func (*RefreshAccessTokenRequest) Reset

func (x *RefreshAccessTokenRequest) Reset()

func (*RefreshAccessTokenRequest) String

func (x *RefreshAccessTokenRequest) String() string

type RefreshAccessTokenResponse

type RefreshAccessTokenResponse struct {
	AccessToken string       `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
	ErrorReason *ErrorReason `protobuf:"bytes,2,opt,name=error_reason,json=errorReason,proto3" json:"error_reason,omitempty"`
	// contains filtered or unexported fields
}

func (*RefreshAccessTokenResponse) Descriptor deprecated

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

Deprecated: Use RefreshAccessTokenResponse.ProtoReflect.Descriptor instead.

func (*RefreshAccessTokenResponse) GetAccessToken

func (x *RefreshAccessTokenResponse) GetAccessToken() string

func (*RefreshAccessTokenResponse) GetErrorReason

func (x *RefreshAccessTokenResponse) GetErrorReason() *ErrorReason

func (*RefreshAccessTokenResponse) ProtoMessage

func (*RefreshAccessTokenResponse) ProtoMessage()

func (*RefreshAccessTokenResponse) ProtoReflect

func (*RefreshAccessTokenResponse) Reset

func (x *RefreshAccessTokenResponse) Reset()

func (*RefreshAccessTokenResponse) String

func (x *RefreshAccessTokenResponse) String() string

type RegisterRequest

type RegisterRequest struct {
	Email           string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	Password        string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	PasswordConfirm string `protobuf:"bytes,3,opt,name=password_confirm,json=passwordConfirm,proto3" json:"password_confirm,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterRequest) Descriptor deprecated

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

Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead.

func (*RegisterRequest) GetEmail

func (x *RegisterRequest) GetEmail() string

func (*RegisterRequest) GetPassword

func (x *RegisterRequest) GetPassword() string

func (*RegisterRequest) GetPasswordConfirm

func (x *RegisterRequest) GetPasswordConfirm() string

func (*RegisterRequest) ProtoMessage

func (*RegisterRequest) ProtoMessage()

func (*RegisterRequest) ProtoReflect

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

func (*RegisterRequest) Reset

func (x *RegisterRequest) Reset()

func (*RegisterRequest) String

func (x *RegisterRequest) String() string

type RegisterResponse

type RegisterResponse struct {
	Success     bool         `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	SuccessMsg  string       `protobuf:"bytes,2,opt,name=success_msg,json=successMsg,proto3" json:"success_msg,omitempty"`
	ErrorReason *ErrorReason `protobuf:"bytes,3,opt,name=error_reason,json=errorReason,proto3" json:"error_reason,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterResponse) Descriptor deprecated

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

Deprecated: Use RegisterResponse.ProtoReflect.Descriptor instead.

func (*RegisterResponse) GetErrorReason

func (x *RegisterResponse) GetErrorReason() *ErrorReason

func (*RegisterResponse) GetSuccess

func (x *RegisterResponse) GetSuccess() bool

func (*RegisterResponse) GetSuccessMsg

func (x *RegisterResponse) GetSuccessMsg() string

func (*RegisterResponse) ProtoMessage

func (*RegisterResponse) ProtoMessage()

func (*RegisterResponse) ProtoReflect

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

func (*RegisterResponse) Reset

func (x *RegisterResponse) Reset()

func (*RegisterResponse) String

func (x *RegisterResponse) String() string

type ResetPasswordRequest

type ResetPasswordRequest struct {
	Email           string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	Password        string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	PasswordConfirm string `protobuf:"bytes,3,opt,name=password_confirm,json=passwordConfirm,proto3" json:"password_confirm,omitempty"`
	// contains filtered or unexported fields
}

func (*ResetPasswordRequest) Descriptor deprecated

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

Deprecated: Use ResetPasswordRequest.ProtoReflect.Descriptor instead.

func (*ResetPasswordRequest) GetEmail

func (x *ResetPasswordRequest) GetEmail() string

func (*ResetPasswordRequest) GetPassword

func (x *ResetPasswordRequest) GetPassword() string

func (*ResetPasswordRequest) GetPasswordConfirm

func (x *ResetPasswordRequest) GetPasswordConfirm() string

func (*ResetPasswordRequest) ProtoMessage

func (*ResetPasswordRequest) ProtoMessage()

func (*ResetPasswordRequest) ProtoReflect

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

func (*ResetPasswordRequest) Reset

func (x *ResetPasswordRequest) Reset()

func (*ResetPasswordRequest) String

func (x *ResetPasswordRequest) String() string

type ResetPasswordResponse

type ResetPasswordResponse struct {
	Success                  bool                 `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	SuccessMsg               string               `protobuf:"bytes,2,opt,name=success_msg,json=successMsg,proto3" json:"success_msg,omitempty"`
	ErrorReason              *ErrorReason         `protobuf:"bytes,3,opt,name=error_reason,json=errorReason,proto3" json:"error_reason,omitempty"`
	ResetPasswordRequestedAt *timestamp.Timestamp `` /* 137-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ResetPasswordResponse) Descriptor deprecated

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

Deprecated: Use ResetPasswordResponse.ProtoReflect.Descriptor instead.

func (*ResetPasswordResponse) GetErrorReason

func (x *ResetPasswordResponse) GetErrorReason() *ErrorReason

func (*ResetPasswordResponse) GetResetPasswordRequestedAt

func (x *ResetPasswordResponse) GetResetPasswordRequestedAt() *timestamp.Timestamp

func (*ResetPasswordResponse) GetSuccess

func (x *ResetPasswordResponse) GetSuccess() bool

func (*ResetPasswordResponse) GetSuccessMsg

func (x *ResetPasswordResponse) GetSuccessMsg() string

func (*ResetPasswordResponse) ProtoMessage

func (*ResetPasswordResponse) ProtoMessage()

func (*ResetPasswordResponse) ProtoReflect

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

func (*ResetPasswordResponse) Reset

func (x *ResetPasswordResponse) Reset()

func (*ResetPasswordResponse) String

func (x *ResetPasswordResponse) String() string

type Roles

type Roles int32

UserRoles for now

const (
	Roles_INVALID    Roles = 0
	Roles_GUEST      Roles = 1
	Roles_USER       Roles = 2
	Roles_ADMIN      Roles = 3 // can be Org or Project Admin
	Roles_SUPERADMIN Roles = 4 // can do all
)

func (Roles) Descriptor

func (Roles) Descriptor() protoreflect.EnumDescriptor

func (Roles) Enum

func (x Roles) Enum() *Roles

func (Roles) EnumDescriptor deprecated

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

Deprecated: Use Roles.Descriptor instead.

func (Roles) Number

func (x Roles) Number() protoreflect.EnumNumber

func (Roles) String

func (x Roles) String() string

func (Roles) Type

func (Roles) Type() protoreflect.EnumType

type SearchAccountsRequest

type SearchAccountsRequest struct {

	// query can be either email, UserDefinedFields fields
	Query        string               `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
	SearchParams *ListAccountsRequest `protobuf:"bytes,2,opt,name=search_params,json=searchParams,proto3" json:"search_params,omitempty"`
	// contains filtered or unexported fields
}

func (*SearchAccountsRequest) Descriptor deprecated

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

Deprecated: Use SearchAccountsRequest.ProtoReflect.Descriptor instead.

func (*SearchAccountsRequest) GetQuery

func (x *SearchAccountsRequest) GetQuery() string

func (*SearchAccountsRequest) GetSearchParams

func (x *SearchAccountsRequest) GetSearchParams() *ListAccountsRequest

func (*SearchAccountsRequest) ProtoMessage

func (*SearchAccountsRequest) ProtoMessage()

func (*SearchAccountsRequest) ProtoReflect

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

func (*SearchAccountsRequest) Reset

func (x *SearchAccountsRequest) Reset()

func (*SearchAccountsRequest) String

func (x *SearchAccountsRequest) String() string

type SearchAccountsResponse

type SearchAccountsResponse struct {
	SearchResponse *ListAccountsResponse `protobuf:"bytes,1,opt,name=search_response,json=searchResponse,proto3" json:"search_response,omitempty"`
	// contains filtered or unexported fields
}

func (*SearchAccountsResponse) Descriptor deprecated

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

Deprecated: Use SearchAccountsResponse.ProtoReflect.Descriptor instead.

func (*SearchAccountsResponse) GetSearchResponse

func (x *SearchAccountsResponse) GetSearchResponse() *ListAccountsResponse

func (*SearchAccountsResponse) ProtoMessage

func (*SearchAccountsResponse) ProtoMessage()

func (*SearchAccountsResponse) ProtoReflect

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

func (*SearchAccountsResponse) Reset

func (x *SearchAccountsResponse) Reset()

func (*SearchAccountsResponse) String

func (x *SearchAccountsResponse) String() string

type UnstableAccountServiceService

type UnstableAccountServiceService interface {
	NewAccount(context.Context, *Account) (*Account, error)
	GetAccount(context.Context, *GetAccountRequest) (*Account, error)
	ListAccounts(context.Context, *ListAccountsRequest) (*ListAccountsResponse, error)
	SearchAccounts(context.Context, *SearchAccountsRequest) (*SearchAccountsResponse, error)
	AssignAccountToRole(context.Context, *AssignAccountToRoleRequest) (*Account, error)
	UpdateAccount(context.Context, *Account) (*Account, error)
	DisableAccount(context.Context, *DisableAccountRequest) (*Account, error)
}

UnstableAccountServiceService is the service API for AccountService service. New methods may be added to this interface if they are added to the service definition, which is not a backward-compatible change. For this reason, use of this type is not recommended.

type UnstableAuthServiceService

type UnstableAuthServiceService interface {
	Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
	Login(context.Context, *LoginRequest) (*LoginResponse, error)
	// ForgotPassword, then ResetPassword if succeed
	ForgotPassword(context.Context, *ForgotPasswordRequest) (*ForgotPasswordResponse, error)
	ResetPassword(context.Context, *ResetPasswordRequest) (*ResetPasswordResponse, error)
	// Refresh Access Token endpoint
	RefreshAccessToken(context.Context, *RefreshAccessTokenRequest) (*RefreshAccessTokenResponse, error)
}

UnstableAuthServiceService is the service API for AuthService service. New methods may be added to this interface if they are added to the service definition, which is not a backward-compatible change. For this reason, use of this type is not recommended.

type UserDefinedFields

type UserDefinedFields struct {
	Fields map[string]*any.Any `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*UserDefinedFields) Descriptor deprecated

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

Deprecated: Use UserDefinedFields.ProtoReflect.Descriptor instead.

func (*UserDefinedFields) GetFields

func (x *UserDefinedFields) GetFields() map[string]*any.Any

func (*UserDefinedFields) ProtoMessage

func (*UserDefinedFields) ProtoMessage()

func (*UserDefinedFields) ProtoReflect

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

func (*UserDefinedFields) Reset

func (x *UserDefinedFields) Reset()

func (*UserDefinedFields) String

func (x *UserDefinedFields) String() string

type UserRoles

type UserRoles struct {
	Role Roles `protobuf:"varint,1,opt,name=role,proto3,enum=getcouragenow.v2.sys_account.Roles" json:"role,omitempty"`
	// Types that are assignable to Resource:
	//	*UserRoles_Project
	//	*UserRoles_Org
	Resource isUserRoles_Resource `protobuf_oneof:"resource"`
	// contains filtered or unexported fields
}

UserRole as a message is super simple and probably not the very best it defines the role as an enum of Roles alongside either None (for guest) or All ( superadmin) or specific project by its id (Project admin) or specific org by its id (Org admin)

func (*UserRoles) Descriptor deprecated

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

Deprecated: Use UserRoles.ProtoReflect.Descriptor instead.

func (*UserRoles) GetOrg

func (x *UserRoles) GetOrg() *Org

func (*UserRoles) GetProject

func (x *UserRoles) GetProject() *Project

func (*UserRoles) GetResource

func (m *UserRoles) GetResource() isUserRoles_Resource

func (*UserRoles) GetRole

func (x *UserRoles) GetRole() Roles

func (*UserRoles) ProtoMessage

func (*UserRoles) ProtoMessage()

func (*UserRoles) ProtoReflect

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

func (*UserRoles) Reset

func (x *UserRoles) Reset()

func (*UserRoles) String

func (x *UserRoles) String() string

type UserRoles_Org

type UserRoles_Org struct {
	Org *Org `protobuf:"bytes,3,opt,name=org,proto3,oneof"`
}

type UserRoles_Project

type UserRoles_Project struct {
	Project *Project `protobuf:"bytes,2,opt,name=project,proto3,oneof"`
}

Jump to

Keyboard shortcuts

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