Documentation ¶
Index ¶
- Variables
- func RegisterPushServer(s grpc.ServiceRegistrar, srv PushServer)
- type AddTokenRequest
- func (*AddTokenRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AddTokenRequest) GetAppInstall() *v1.AppInstallId
- func (x *AddTokenRequest) GetContainerId() *v1.DataContainerId
- func (x *AddTokenRequest) GetOwnerAccountId() *v1.SolanaAccountId
- func (x *AddTokenRequest) GetPushToken() string
- func (x *AddTokenRequest) GetSignature() *v1.Signature
- func (x *AddTokenRequest) GetTokenType() TokenType
- func (*AddTokenRequest) ProtoMessage()
- func (x *AddTokenRequest) ProtoReflect() protoreflect.Message
- func (x *AddTokenRequest) Reset()
- func (x *AddTokenRequest) String() string
- func (m *AddTokenRequest) Validate() error
- type AddTokenRequestValidationError
- func (e AddTokenRequestValidationError) Cause() error
- func (e AddTokenRequestValidationError) Error() string
- func (e AddTokenRequestValidationError) ErrorName() string
- func (e AddTokenRequestValidationError) Field() string
- func (e AddTokenRequestValidationError) Key() bool
- func (e AddTokenRequestValidationError) Reason() string
- type AddTokenResponse
- func (*AddTokenResponse) Descriptor() ([]byte, []int)deprecated
- func (x *AddTokenResponse) GetResult() AddTokenResponse_Result
- func (*AddTokenResponse) ProtoMessage()
- func (x *AddTokenResponse) ProtoReflect() protoreflect.Message
- func (x *AddTokenResponse) Reset()
- func (x *AddTokenResponse) String() string
- func (m *AddTokenResponse) Validate() error
- type AddTokenResponseValidationError
- func (e AddTokenResponseValidationError) Cause() error
- func (e AddTokenResponseValidationError) Error() string
- func (e AddTokenResponseValidationError) ErrorName() string
- func (e AddTokenResponseValidationError) Field() string
- func (e AddTokenResponseValidationError) Key() bool
- func (e AddTokenResponseValidationError) Reason() string
- type AddTokenResponse_Result
- func (AddTokenResponse_Result) Descriptor() protoreflect.EnumDescriptor
- func (x AddTokenResponse_Result) Enum() *AddTokenResponse_Result
- func (AddTokenResponse_Result) EnumDescriptor() ([]byte, []int)deprecated
- func (x AddTokenResponse_Result) Number() protoreflect.EnumNumber
- func (x AddTokenResponse_Result) String() string
- func (AddTokenResponse_Result) Type() protoreflect.EnumType
- type PushClient
- type PushServer
- type TokenType
- type UnimplementedPushServer
- type UnsafePushServer
Constants ¶
This section is empty.
Variables ¶
var ( TokenType_name = map[int32]string{ 0: "UNKNOWN", 1: "FCM_ANDROID", 2: "FCM_APNS", } TokenType_value = map[string]int32{ "UNKNOWN": 0, "FCM_ANDROID": 1, "FCM_APNS": 2, } )
Enum value maps for TokenType.
var ( AddTokenResponse_Result_name = map[int32]string{ 0: "OK", 1: "INVALID_PUSH_TOKEN", } AddTokenResponse_Result_value = map[string]int32{ "OK": 0, "INVALID_PUSH_TOKEN": 1, } )
Enum value maps for AddTokenResponse_Result.
var File_push_v1_push_service_proto protoreflect.FileDescriptor
var Push_ServiceDesc = grpc.ServiceDesc{ ServiceName: "code.push.v1.Push", HandlerType: (*PushServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "AddToken", Handler: _Push_AddToken_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "push/v1/push_service.proto", }
Push_ServiceDesc is the grpc.ServiceDesc for Push service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterPushServer ¶
func RegisterPushServer(s grpc.ServiceRegistrar, srv PushServer)
Types ¶
type AddTokenRequest ¶
type AddTokenRequest struct { // The public key of the owner account that signed this request message. OwnerAccountId *v1.SolanaAccountId `protobuf:"bytes,1,opt,name=owner_account_id,json=ownerAccountId,proto3" json:"owner_account_id,omitempty"` // The signature is of serialize(AddTokenRequest) without this field set // using the private key of owner_account_id. This provides an authentication // mechanism to the RPC. Signature *v1.Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` // The data container where the push token will be stored. ContainerId *v1.DataContainerId `protobuf:"bytes,3,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` // The push token to store PushToken string `protobuf:"bytes,4,opt,name=push_token,json=pushToken,proto3" json:"push_token,omitempty"` // The type of push token TokenType TokenType `protobuf:"varint,5,opt,name=token_type,json=tokenType,proto3,enum=code.push.v1.TokenType" json:"token_type,omitempty"` // The instance of the app install where the push token was generated. Ideally, // the push token is unique to the install. AppInstall *v1.AppInstallId `protobuf:"bytes,6,opt,name=app_install,json=appInstall,proto3" json:"app_install,omitempty"` // contains filtered or unexported fields }
func (*AddTokenRequest) Descriptor
deprecated
func (*AddTokenRequest) Descriptor() ([]byte, []int)
Deprecated: Use AddTokenRequest.ProtoReflect.Descriptor instead.
func (*AddTokenRequest) GetAppInstall ¶
func (x *AddTokenRequest) GetAppInstall() *v1.AppInstallId
func (*AddTokenRequest) GetContainerId ¶
func (x *AddTokenRequest) GetContainerId() *v1.DataContainerId
func (*AddTokenRequest) GetOwnerAccountId ¶
func (x *AddTokenRequest) GetOwnerAccountId() *v1.SolanaAccountId
func (*AddTokenRequest) GetPushToken ¶
func (x *AddTokenRequest) GetPushToken() string
func (*AddTokenRequest) GetSignature ¶
func (x *AddTokenRequest) GetSignature() *v1.Signature
func (*AddTokenRequest) GetTokenType ¶
func (x *AddTokenRequest) GetTokenType() TokenType
func (*AddTokenRequest) ProtoMessage ¶
func (*AddTokenRequest) ProtoMessage()
func (*AddTokenRequest) ProtoReflect ¶
func (x *AddTokenRequest) ProtoReflect() protoreflect.Message
func (*AddTokenRequest) Reset ¶
func (x *AddTokenRequest) Reset()
func (*AddTokenRequest) String ¶
func (x *AddTokenRequest) String() string
func (*AddTokenRequest) Validate ¶
func (m *AddTokenRequest) Validate() error
Validate checks the field values on AddTokenRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type AddTokenRequestValidationError ¶
type AddTokenRequestValidationError struct {
// contains filtered or unexported fields
}
AddTokenRequestValidationError is the validation error returned by AddTokenRequest.Validate if the designated constraints aren't met.
func (AddTokenRequestValidationError) Cause ¶
func (e AddTokenRequestValidationError) Cause() error
Cause function returns cause value.
func (AddTokenRequestValidationError) Error ¶
func (e AddTokenRequestValidationError) Error() string
Error satisfies the builtin error interface
func (AddTokenRequestValidationError) ErrorName ¶
func (e AddTokenRequestValidationError) ErrorName() string
ErrorName returns error name.
func (AddTokenRequestValidationError) Field ¶
func (e AddTokenRequestValidationError) Field() string
Field function returns field value.
func (AddTokenRequestValidationError) Key ¶
func (e AddTokenRequestValidationError) Key() bool
Key function returns key value.
func (AddTokenRequestValidationError) Reason ¶
func (e AddTokenRequestValidationError) Reason() string
Reason function returns reason value.
type AddTokenResponse ¶
type AddTokenResponse struct { Result AddTokenResponse_Result `protobuf:"varint,1,opt,name=result,proto3,enum=code.push.v1.AddTokenResponse_Result" json:"result,omitempty"` // contains filtered or unexported fields }
func (*AddTokenResponse) Descriptor
deprecated
func (*AddTokenResponse) Descriptor() ([]byte, []int)
Deprecated: Use AddTokenResponse.ProtoReflect.Descriptor instead.
func (*AddTokenResponse) GetResult ¶
func (x *AddTokenResponse) GetResult() AddTokenResponse_Result
func (*AddTokenResponse) ProtoMessage ¶
func (*AddTokenResponse) ProtoMessage()
func (*AddTokenResponse) ProtoReflect ¶
func (x *AddTokenResponse) ProtoReflect() protoreflect.Message
func (*AddTokenResponse) Reset ¶
func (x *AddTokenResponse) Reset()
func (*AddTokenResponse) String ¶
func (x *AddTokenResponse) String() string
func (*AddTokenResponse) Validate ¶
func (m *AddTokenResponse) Validate() error
Validate checks the field values on AddTokenResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type AddTokenResponseValidationError ¶
type AddTokenResponseValidationError struct {
// contains filtered or unexported fields
}
AddTokenResponseValidationError is the validation error returned by AddTokenResponse.Validate if the designated constraints aren't met.
func (AddTokenResponseValidationError) Cause ¶
func (e AddTokenResponseValidationError) Cause() error
Cause function returns cause value.
func (AddTokenResponseValidationError) Error ¶
func (e AddTokenResponseValidationError) Error() string
Error satisfies the builtin error interface
func (AddTokenResponseValidationError) ErrorName ¶
func (e AddTokenResponseValidationError) ErrorName() string
ErrorName returns error name.
func (AddTokenResponseValidationError) Field ¶
func (e AddTokenResponseValidationError) Field() string
Field function returns field value.
func (AddTokenResponseValidationError) Key ¶
func (e AddTokenResponseValidationError) Key() bool
Key function returns key value.
func (AddTokenResponseValidationError) Reason ¶
func (e AddTokenResponseValidationError) Reason() string
Reason function returns reason value.
type AddTokenResponse_Result ¶
type AddTokenResponse_Result int32
const ( AddTokenResponse_OK AddTokenResponse_Result = 0 // The push token is invalid and wasn't stored. AddTokenResponse_INVALID_PUSH_TOKEN AddTokenResponse_Result = 1 )
func (AddTokenResponse_Result) Descriptor ¶
func (AddTokenResponse_Result) Descriptor() protoreflect.EnumDescriptor
func (AddTokenResponse_Result) Enum ¶
func (x AddTokenResponse_Result) Enum() *AddTokenResponse_Result
func (AddTokenResponse_Result) EnumDescriptor
deprecated
func (AddTokenResponse_Result) EnumDescriptor() ([]byte, []int)
Deprecated: Use AddTokenResponse_Result.Descriptor instead.
func (AddTokenResponse_Result) Number ¶
func (x AddTokenResponse_Result) Number() protoreflect.EnumNumber
func (AddTokenResponse_Result) String ¶
func (x AddTokenResponse_Result) String() string
func (AddTokenResponse_Result) Type ¶
func (AddTokenResponse_Result) Type() protoreflect.EnumType
type PushClient ¶
type PushClient interface { // AddToken stores a push token in a data container. The call is idempotent // and adding an existing valid token will not fail. Token types will be // validated against the user agent and any mismatches will result in an // INVALID_ARGUMENT status error. AddToken(ctx context.Context, in *AddTokenRequest, opts ...grpc.CallOption) (*AddTokenResponse, error) }
PushClient is the client API for Push 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 NewPushClient ¶
func NewPushClient(cc grpc.ClientConnInterface) PushClient
type PushServer ¶
type PushServer interface { // AddToken stores a push token in a data container. The call is idempotent // and adding an existing valid token will not fail. Token types will be // validated against the user agent and any mismatches will result in an // INVALID_ARGUMENT status error. AddToken(context.Context, *AddTokenRequest) (*AddTokenResponse, error) // contains filtered or unexported methods }
PushServer is the server API for Push service. All implementations must embed UnimplementedPushServer for forward compatibility
type TokenType ¶
type TokenType int32
func (TokenType) Descriptor ¶
func (TokenType) Descriptor() protoreflect.EnumDescriptor
func (TokenType) EnumDescriptor
deprecated
func (TokenType) Number ¶
func (x TokenType) Number() protoreflect.EnumNumber
func (TokenType) Type ¶
func (TokenType) Type() protoreflect.EnumType
type UnimplementedPushServer ¶
type UnimplementedPushServer struct { }
UnimplementedPushServer must be embedded to have forward compatible implementations.
func (UnimplementedPushServer) AddToken ¶
func (UnimplementedPushServer) AddToken(context.Context, *AddTokenRequest) (*AddTokenResponse, error)
type UnsafePushServer ¶
type UnsafePushServer interface {
// contains filtered or unexported methods
}
UnsafePushServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PushServer will result in compilation errors.