device

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: MIT Imports: 21 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RegisterLoggedInAccountsResponse_Result_name = map[int32]string{
		0: "OK",
		1: "INVALID_OWNER",
	}
	RegisterLoggedInAccountsResponse_Result_value = map[string]int32{
		"OK":            0,
		"INVALID_OWNER": 1,
	}
)

Enum value maps for RegisterLoggedInAccountsResponse_Result.

View Source
var (
	GetLoggedInAccountsResponse_Result_name = map[int32]string{
		0: "OK",
	}
	GetLoggedInAccountsResponse_Result_value = map[string]int32{
		"OK": 0,
	}
)

Enum value maps for GetLoggedInAccountsResponse_Result.

View Source
var Device_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "code.device.v1.Device",
	HandlerType: (*DeviceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "RegisterLoggedInAccounts",
			Handler:    _Device_RegisterLoggedInAccounts_Handler,
		},
		{
			MethodName: "GetLoggedInAccounts",
			Handler:    _Device_GetLoggedInAccounts_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "device/v1/device_service.proto",
}

Device_ServiceDesc is the grpc.ServiceDesc for Device 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_device_v1_device_service_proto protoreflect.FileDescriptor

Functions

func RegisterDeviceServer

func RegisterDeviceServer(s grpc.ServiceRegistrar, srv DeviceServer)

Types

type DeviceClient

type DeviceClient interface {
	// RegisterLoggedInAccounts registers a set of owner accounts logged for
	// an app install. Currently, a single login is enforced per app install.
	// After using GetLoggedInAccounts to detect stale logins, clients can use
	// this RPC to update the set of accounts with valid login sessions.
	RegisterLoggedInAccounts(ctx context.Context, in *RegisterLoggedInAccountsRequest, opts ...grpc.CallOption) (*RegisterLoggedInAccountsResponse, error)
	// GetLoggedInAccounts gets the set of logged in accounts for an app install.
	// Clients can use this RPC to detect stale logins for boot out of the app.
	GetLoggedInAccounts(ctx context.Context, in *GetLoggedInAccountsRequest, opts ...grpc.CallOption) (*GetLoggedInAccountsResponse, error)
}

DeviceClient is the client API for Device 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 NewDeviceClient

func NewDeviceClient(cc grpc.ClientConnInterface) DeviceClient

type DeviceServer

type DeviceServer interface {
	// RegisterLoggedInAccounts registers a set of owner accounts logged for
	// an app install. Currently, a single login is enforced per app install.
	// After using GetLoggedInAccounts to detect stale logins, clients can use
	// this RPC to update the set of accounts with valid login sessions.
	RegisterLoggedInAccounts(context.Context, *RegisterLoggedInAccountsRequest) (*RegisterLoggedInAccountsResponse, error)
	// GetLoggedInAccounts gets the set of logged in accounts for an app install.
	// Clients can use this RPC to detect stale logins for boot out of the app.
	GetLoggedInAccounts(context.Context, *GetLoggedInAccountsRequest) (*GetLoggedInAccountsResponse, error)
	// contains filtered or unexported methods
}

DeviceServer is the server API for Device service. All implementations must embed UnimplementedDeviceServer for forward compatibility

type GetLoggedInAccountsRequest

type GetLoggedInAccountsRequest struct {
	AppInstall *v1.AppInstallId `protobuf:"bytes,1,opt,name=app_install,json=appInstall,proto3" json:"app_install,omitempty"`
	// contains filtered or unexported fields
}

func (*GetLoggedInAccountsRequest) Descriptor deprecated

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

Deprecated: Use GetLoggedInAccountsRequest.ProtoReflect.Descriptor instead.

func (*GetLoggedInAccountsRequest) GetAppInstall

func (x *GetLoggedInAccountsRequest) GetAppInstall() *v1.AppInstallId

func (*GetLoggedInAccountsRequest) ProtoMessage

func (*GetLoggedInAccountsRequest) ProtoMessage()

func (*GetLoggedInAccountsRequest) ProtoReflect

func (*GetLoggedInAccountsRequest) Reset

func (x *GetLoggedInAccountsRequest) Reset()

func (*GetLoggedInAccountsRequest) String

func (x *GetLoggedInAccountsRequest) String() string

func (*GetLoggedInAccountsRequest) Validate

func (m *GetLoggedInAccountsRequest) Validate() error

Validate checks the field values on GetLoggedInAccountsRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type GetLoggedInAccountsRequestValidationError

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

GetLoggedInAccountsRequestValidationError is the validation error returned by GetLoggedInAccountsRequest.Validate if the designated constraints aren't met.

func (GetLoggedInAccountsRequestValidationError) Cause

Cause function returns cause value.

func (GetLoggedInAccountsRequestValidationError) Error

Error satisfies the builtin error interface

func (GetLoggedInAccountsRequestValidationError) ErrorName

ErrorName returns error name.

func (GetLoggedInAccountsRequestValidationError) Field

Field function returns field value.

func (GetLoggedInAccountsRequestValidationError) Key

Key function returns key value.

func (GetLoggedInAccountsRequestValidationError) Reason

Reason function returns reason value.

type GetLoggedInAccountsResponse

type GetLoggedInAccountsResponse struct {
	Result GetLoggedInAccountsResponse_Result `protobuf:"varint,1,opt,name=result,proto3,enum=code.device.v1.GetLoggedInAccountsResponse_Result" json:"result,omitempty"`
	Owners []*v1.SolanaAccountId              `protobuf:"bytes,2,rep,name=owners,proto3" json:"owners,omitempty"`
	// contains filtered or unexported fields
}

func (*GetLoggedInAccountsResponse) Descriptor deprecated

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

Deprecated: Use GetLoggedInAccountsResponse.ProtoReflect.Descriptor instead.

func (*GetLoggedInAccountsResponse) GetOwners

func (*GetLoggedInAccountsResponse) GetResult

func (*GetLoggedInAccountsResponse) ProtoMessage

func (*GetLoggedInAccountsResponse) ProtoMessage()

func (*GetLoggedInAccountsResponse) ProtoReflect

func (*GetLoggedInAccountsResponse) Reset

func (x *GetLoggedInAccountsResponse) Reset()

func (*GetLoggedInAccountsResponse) String

func (x *GetLoggedInAccountsResponse) String() string

func (*GetLoggedInAccountsResponse) Validate

func (m *GetLoggedInAccountsResponse) Validate() error

Validate checks the field values on GetLoggedInAccountsResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type GetLoggedInAccountsResponseValidationError

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

GetLoggedInAccountsResponseValidationError is the validation error returned by GetLoggedInAccountsResponse.Validate if the designated constraints aren't met.

func (GetLoggedInAccountsResponseValidationError) Cause

Cause function returns cause value.

func (GetLoggedInAccountsResponseValidationError) Error

Error satisfies the builtin error interface

func (GetLoggedInAccountsResponseValidationError) ErrorName

ErrorName returns error name.

func (GetLoggedInAccountsResponseValidationError) Field

Field function returns field value.

func (GetLoggedInAccountsResponseValidationError) Key

Key function returns key value.

func (GetLoggedInAccountsResponseValidationError) Reason

Reason function returns reason value.

type GetLoggedInAccountsResponse_Result

type GetLoggedInAccountsResponse_Result int32
const (
	GetLoggedInAccountsResponse_OK GetLoggedInAccountsResponse_Result = 0
)

func (GetLoggedInAccountsResponse_Result) Descriptor

func (GetLoggedInAccountsResponse_Result) Enum

func (GetLoggedInAccountsResponse_Result) EnumDescriptor deprecated

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

Deprecated: Use GetLoggedInAccountsResponse_Result.Descriptor instead.

func (GetLoggedInAccountsResponse_Result) Number

func (GetLoggedInAccountsResponse_Result) String

func (GetLoggedInAccountsResponse_Result) Type

type RegisterLoggedInAccountsRequest

type RegisterLoggedInAccountsRequest struct {
	AppInstall *v1.AppInstallId `protobuf:"bytes,1,opt,name=app_install,json=appInstall,proto3" json:"app_install,omitempty"`
	// The set of owners logged into the app install. Setting an empty value
	// indicates there are no logged in users. We allow for more than one owner
	// in the spec with a repeated field to be flexible in the future.
	Owners []*v1.SolanaAccountId `protobuf:"bytes,2,rep,name=owners,proto3" json:"owners,omitempty"`
	// Signature values must appear in the exact order their respecitive signing
	// owner account appears in the owners field. All signatures should be generated
	// without any other signature values set.
	Signatures []*v1.Signature `protobuf:"bytes,3,rep,name=signatures,proto3" json:"signatures,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterLoggedInAccountsRequest) Descriptor deprecated

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

Deprecated: Use RegisterLoggedInAccountsRequest.ProtoReflect.Descriptor instead.

func (*RegisterLoggedInAccountsRequest) GetAppInstall

func (x *RegisterLoggedInAccountsRequest) GetAppInstall() *v1.AppInstallId

func (*RegisterLoggedInAccountsRequest) GetOwners

func (*RegisterLoggedInAccountsRequest) GetSignatures

func (x *RegisterLoggedInAccountsRequest) GetSignatures() []*v1.Signature

func (*RegisterLoggedInAccountsRequest) ProtoMessage

func (*RegisterLoggedInAccountsRequest) ProtoMessage()

func (*RegisterLoggedInAccountsRequest) ProtoReflect

func (*RegisterLoggedInAccountsRequest) Reset

func (*RegisterLoggedInAccountsRequest) String

func (*RegisterLoggedInAccountsRequest) Validate

func (m *RegisterLoggedInAccountsRequest) Validate() error

Validate checks the field values on RegisterLoggedInAccountsRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type RegisterLoggedInAccountsRequestValidationError

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

RegisterLoggedInAccountsRequestValidationError is the validation error returned by RegisterLoggedInAccountsRequest.Validate if the designated constraints aren't met.

func (RegisterLoggedInAccountsRequestValidationError) Cause

Cause function returns cause value.

func (RegisterLoggedInAccountsRequestValidationError) Error

Error satisfies the builtin error interface

func (RegisterLoggedInAccountsRequestValidationError) ErrorName

ErrorName returns error name.

func (RegisterLoggedInAccountsRequestValidationError) Field

Field function returns field value.

func (RegisterLoggedInAccountsRequestValidationError) Key

Key function returns key value.

func (RegisterLoggedInAccountsRequestValidationError) Reason

Reason function returns reason value.

type RegisterLoggedInAccountsResponse

type RegisterLoggedInAccountsResponse struct {
	Result RegisterLoggedInAccountsResponse_Result `` /* 126-byte string literal not displayed */
	// Set of invalid owner accounts detected in the request. An owner account
	// can be invalid for several reasons: not phone verified, timelock account
	// unlocked, etc. Value is set when result is INVALID_OWNER.
	InvalidOwners []*v1.SolanaAccountId `protobuf:"bytes,2,rep,name=invalid_owners,json=invalidOwners,proto3" json:"invalid_owners,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterLoggedInAccountsResponse) Descriptor deprecated

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

Deprecated: Use RegisterLoggedInAccountsResponse.ProtoReflect.Descriptor instead.

func (*RegisterLoggedInAccountsResponse) GetInvalidOwners

func (x *RegisterLoggedInAccountsResponse) GetInvalidOwners() []*v1.SolanaAccountId

func (*RegisterLoggedInAccountsResponse) GetResult

func (*RegisterLoggedInAccountsResponse) ProtoMessage

func (*RegisterLoggedInAccountsResponse) ProtoMessage()

func (*RegisterLoggedInAccountsResponse) ProtoReflect

func (*RegisterLoggedInAccountsResponse) Reset

func (*RegisterLoggedInAccountsResponse) String

func (*RegisterLoggedInAccountsResponse) Validate

Validate checks the field values on RegisterLoggedInAccountsResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type RegisterLoggedInAccountsResponseValidationError

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

RegisterLoggedInAccountsResponseValidationError is the validation error returned by RegisterLoggedInAccountsResponse.Validate if the designated constraints aren't met.

func (RegisterLoggedInAccountsResponseValidationError) Cause

Cause function returns cause value.

func (RegisterLoggedInAccountsResponseValidationError) Error

Error satisfies the builtin error interface

func (RegisterLoggedInAccountsResponseValidationError) ErrorName

ErrorName returns error name.

func (RegisterLoggedInAccountsResponseValidationError) Field

Field function returns field value.

func (RegisterLoggedInAccountsResponseValidationError) Key

Key function returns key value.

func (RegisterLoggedInAccountsResponseValidationError) Reason

Reason function returns reason value.

type RegisterLoggedInAccountsResponse_Result

type RegisterLoggedInAccountsResponse_Result int32
const (
	RegisterLoggedInAccountsResponse_OK            RegisterLoggedInAccountsResponse_Result = 0
	RegisterLoggedInAccountsResponse_INVALID_OWNER RegisterLoggedInAccountsResponse_Result = 1
)

func (RegisterLoggedInAccountsResponse_Result) Descriptor

func (RegisterLoggedInAccountsResponse_Result) Enum

func (RegisterLoggedInAccountsResponse_Result) EnumDescriptor deprecated

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

Deprecated: Use RegisterLoggedInAccountsResponse_Result.Descriptor instead.

func (RegisterLoggedInAccountsResponse_Result) Number

func (RegisterLoggedInAccountsResponse_Result) String

func (RegisterLoggedInAccountsResponse_Result) Type

type UnimplementedDeviceServer

type UnimplementedDeviceServer struct {
}

UnimplementedDeviceServer must be embedded to have forward compatible implementations.

type UnsafeDeviceServer

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

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

Jump to

Keyboard shortcuts

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