types

package
v0.0.0-...-545bd39 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 16 Imported by: 2

Documentation

Index

Constants

View Source
const (
	DeepLinkChainTypeKey = "chain_type"
	DeepLinkActionKey    = "action"
	DeepLinkAddressKey   = "address"
	DeepLinkAmountKey    = "amount"

	DeepLinkActionSendTokens  = "send_tokens"
	DeepLinkActionViewProfile = "view_profile"
)
View Source
const (
	NotificationTypeKey    = "type"
	NotificationMessageKey = "message"
)

Variables

View Source
var (
	ErrInvalidLengthLinks        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowLinks          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupLinks = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthRequests        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowRequests          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupRequests = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	DefaultSessionLength = time.Hour * 24 * 7 // 7 days
)

Functions

func BackgroundAPNSConfig

func BackgroundAPNSConfig() *messaging.APNSConfig

BackgroundAPNSConfig returns the APNSConfig to be used when sending a notification in background to iOS devices. This ensures that the notification can be properly received by the device.

func BackgroundAndroidConfig

func BackgroundAndroidConfig() *messaging.AndroidConfig

BackgroundAndroidConfig returns the AndroidConfig to be used when sending a notification in background. This makes sure that the notification can be properly received by the device.

Types

type AppNotificationDeviceToken

type AppNotificationDeviceToken struct {
	AppID       string
	DeviceToken string
}

AppNotificationDeviceToken represents a notification device token that is associated to an application

func NewAppNotificationDeviceToken

func NewAppNotificationDeviceToken(appID, deviceToken string) *AppNotificationDeviceToken

type AppToken

type AppToken struct {
	AppID string
	Name  string
	Value string
}

func NewAppToken

func NewAppToken(appID string, tokenName string) AppToken

type Application

type Application struct {
	ID                      string
	Name                    string
	WalletAddress           string
	SubscriptionID          uint64
	SecretKey               string
	NotificationsWebhookURL string
	Admins                  []string
	CreationTime            time.Time
}

func NewApplication

func NewApplication(
	id string,
	name string,
	walletAddress string,
	subscriptionID uint64,
	secretKey string,
	notificationsWebhookURL string,
	admins []string,
	creationTime time.Time,
) *Application

type ApplicationSubscription

type ApplicationSubscription struct {
	ID                     uint64
	Name                   string
	FeeGrantLimit          uint64
	NotificationsRateLimit uint64
	DeepLinksRateLimit     uint64
}

func NewApplicationSubscription

func NewApplicationSubscription(id uint64, name string, feeGrantLimit uint64, notificationsRateLimit uint64, deepLinksRateLimit uint64) ApplicationSubscription
type CreatedDeepLink struct {
	ID           string
	AppID        string
	URL          string
	Config       *LinkConfig
	CreationTime time.Time
}

CreatedDeepLink contains the data of a deep link created by an application

func NewCreatedDeepLink(appID string, linkURL string, config *LinkConfig) *CreatedDeepLink

type DeepLinkConfig

type DeepLinkConfig struct {
	// Set the deep link path for all platforms - so you don't have to enable it
	// by platform. When the Branch SDK receives a link with this parameter set,
	// it will automatically load the custom URI path contained within. Default:
	// open?link_click_id=1234
	DeepLinkPath string `protobuf:"bytes,1,opt,name=deep_link_path,json=deepLinkPath,proto3" json:"$deeplink_path,omitempty"`
	// Set the deep link path for Android apps. When the Branch SDK receives a
	// link with this parameter set, it will automatically load the custom Android
	// URI path contained within
	AndroidDeepLinkPath string `protobuf:"bytes,2,opt,name=android_deep_link_path,json=androidDeepLinkPath,proto3" json:"$android_deeplink_path,omitempty"`
	// Set the deep link path for iOS apps. When the Branch SDK receives a link
	// with this parameter set, it will automatically load the custom iOS URI path
	// contained within
	IosDeepLinkPath string `protobuf:"bytes,3,opt,name=ios_deep_link_path,json=iosDeepLinkPath,proto3" json:"$ios_deeplink_path,omitempty"`
	// Set the deep link path for Desktop apps. You will have to fetch this
	// parameter and route the user accordingly
	DesktopDeepLinkPath string `protobuf:"bytes,4,opt,name=desktop_deep_link_path,json=desktopDeepLinkPath,proto3" json:"$desktop_deeplink_path,omitempty"`
}

DeepLinkConfig contains the deep link properties that will be added to the generated link

func (*DeepLinkConfig) Descriptor

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

func (*DeepLinkConfig) GetAndroidDeepLinkPath

func (m *DeepLinkConfig) GetAndroidDeepLinkPath() string

func (*DeepLinkConfig) GetDeepLinkPath

func (m *DeepLinkConfig) GetDeepLinkPath() string

func (*DeepLinkConfig) GetDesktopDeepLinkPath

func (m *DeepLinkConfig) GetDesktopDeepLinkPath() string

func (*DeepLinkConfig) GetIosDeepLinkPath

func (m *DeepLinkConfig) GetIosDeepLinkPath() string

func (*DeepLinkConfig) Marshal

func (m *DeepLinkConfig) Marshal() (dAtA []byte, err error)

func (*DeepLinkConfig) MarshalTo

func (m *DeepLinkConfig) MarshalTo(dAtA []byte) (int, error)

func (*DeepLinkConfig) MarshalToSizedBuffer

func (m *DeepLinkConfig) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DeepLinkConfig) ProtoMessage

func (*DeepLinkConfig) ProtoMessage()

func (*DeepLinkConfig) Reset

func (m *DeepLinkConfig) Reset()

func (*DeepLinkConfig) Size

func (m *DeepLinkConfig) Size() (n int)

func (*DeepLinkConfig) String

func (m *DeepLinkConfig) String() string

func (*DeepLinkConfig) Unmarshal

func (m *DeepLinkConfig) Unmarshal(dAtA []byte) error

func (*DeepLinkConfig) XXX_DiscardUnknown

func (m *DeepLinkConfig) XXX_DiscardUnknown()

func (*DeepLinkConfig) XXX_Marshal

func (m *DeepLinkConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DeepLinkConfig) XXX_Merge

func (m *DeepLinkConfig) XXX_Merge(src proto.Message)

func (*DeepLinkConfig) XXX_Size

func (m *DeepLinkConfig) XXX_Size() int

func (*DeepLinkConfig) XXX_Unmarshal

func (m *DeepLinkConfig) XXX_Unmarshal(b []byte) error

type EncryptedAppToken

type EncryptedAppToken struct {
	AppID        string
	TokenName    string
	TokenValue   string
	CreationTime time.Time
}

func NewEncryptedAppToken

func NewEncryptedAppToken(appID string, tokenName string, tokenValue string, creationTime time.Time) *EncryptedAppToken

NewEncryptedAppToken returns a new EncryptedAppToken instance

type EncryptedNonce

type EncryptedNonce struct {
	// DesmosAddress is the address of the user that is associated to the nonce.
	DesmosAddress string

	// EncryptedValue is the SHA-256 encrypted nonce value.
	EncryptedValue string

	// ExpirationTime is the time at which the nonce will expire.
	ExpirationTime time.Time
}

EncryptedNonce represents a nonce that has been encrypted and safely stored inside the database

func NewEncryptedNonce

func NewEncryptedNonce(desmosAddress string, encryptedValue string, expirationTime time.Time) *EncryptedNonce

NewEncryptedNonce returns a new EncryptedNonce instance

func (*EncryptedNonce) IsExpired

func (e *EncryptedNonce) IsExpired() bool

type EncryptedUserSession

type EncryptedUserSession struct {
	DesmosAddress  string
	EncryptedToken string
	CreationDate   time.Time
	ExpiryTime     *time.Time
}

func NewEncryptedUserSession

func NewEncryptedUserSession(desmosAddress string, token string, creationDate time.Time, expiryTime *time.Time) *EncryptedUserSession

NewEncryptedUserSession returns a new EncryptedUserSession instance

func (*EncryptedUserSession) IsExpired

func (s *EncryptedUserSession) IsExpired() bool

func (*EncryptedUserSession) Refresh

Refresh refreshes this session instance extending its expiration time

func (*EncryptedUserSession) Validate

func (s *EncryptedUserSession) Validate() (shouldRefresh bool, shouldDelete bool, err error)

Validate checks the validity of this session based on the given Desmos address. It returns an error if anything goes wrong, and true if the session should be refresh and/or deleted from the store.

type FeeGrantAllowance

type FeeGrantAllowance struct {
	// ExpirationTime is the time at which the fee grant allowance expires.
	// If nil, the fee grant allowance has no expiration time.
	ExpirationTime *time.Time

	// SpendLimit is the maximum amount of coins that can be spent by the user.
	// If nil, the fee grant allowance has no spend limit.
	SpendLimit sdk.Coins

	// AllowedMessages are the messages that the user is allowed to send.
	// If nil, the user will be able to send any message.
	AllowedMessages []string
}

FeeGrantAllowance contains the data of a fee grant allowance that the user has been granted

func NewAuthorization

func NewAuthorization(expirationTime *time.Time, spendLimit sdk.Coins, allowedMessages []string) *FeeGrantAllowance

type FeeGrantRequest

type FeeGrantRequest struct {
	// Unique id that identifies the request
	ID string

	// AppID is the ID of the application that is requesting the fee grant for the user.
	AppID string

	// DesmosAddress is the Desmos address of the user requesting the fee grant allowance.
	DesmosAddress string

	// Allowance represents the fee allowance that should be granted
	Allowance feegrant.FeeAllowanceI

	// RequestTime is the time at which the user requested the fee grant allowance.
	RequestTime time.Time

	// GrantTime is the time at which the user wants the fee grant allowance to be granted.
	// If nil, the fee grant allowance has not been granted yet.
	GrantTime *time.Time
}

FeeGrantRequest contains the data of a fee grant allowance request that the user has made

func NewFeeGrantRequest

func NewFeeGrantRequest(appID string, desmosAddress string, allowance feegrant.FeeAllowanceI, requestTime time.Time, grantTime *time.Time) FeeGrantRequest

type LinkConfig

type LinkConfig struct {
	// OpenGraph allows to handle Facebook properties
	OpenGraph *OpenGraphConfig `protobuf:"bytes,1,opt,name=open_graph,json=openGraph,proto3" json:"open_graph"`
	// Twitter contains custom Twitter properties
	Twitter *TwitterConfig `protobuf:"bytes,2,opt,name=twitter,proto3" json:"twitter"`
	// CustomData should contain the custom data that will be added to the
	// generated link. This should be a JSON-encoded map of key-pair values.
	CustomData []byte `protobuf:"bytes,3,opt,name=custom_data,json=customData,proto3" json:"custom_data"`
	// Redirections allows to navigate to different locations based on device
	// information. Note: Navigation URLs must be websites, not deep links
	Redirections *RedirectionsConfig `protobuf:"bytes,4,opt,name=redirections,proto3" json:"redirections"`
	// DeepLinking allows to navigate to different locations based on device
	// information
	DeepLinking *DeepLinkConfig `protobuf:"bytes,5,opt,name=deep_linking,json=deepLinking,proto3" json:"deep_linking"`
}

func (*LinkConfig) Descriptor

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

func (*LinkConfig) GetCustomData

func (m *LinkConfig) GetCustomData() []byte

func (*LinkConfig) GetDeepLinking

func (m *LinkConfig) GetDeepLinking() *DeepLinkConfig

func (*LinkConfig) GetOpenGraph

func (m *LinkConfig) GetOpenGraph() *OpenGraphConfig

func (*LinkConfig) GetRedirections

func (m *LinkConfig) GetRedirections() *RedirectionsConfig

func (*LinkConfig) GetTwitter

func (m *LinkConfig) GetTwitter() *TwitterConfig

func (*LinkConfig) Marshal

func (m *LinkConfig) Marshal() (dAtA []byte, err error)

func (*LinkConfig) MarshalTo

func (m *LinkConfig) MarshalTo(dAtA []byte) (int, error)

func (*LinkConfig) MarshalToSizedBuffer

func (m *LinkConfig) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LinkConfig) ProtoMessage

func (*LinkConfig) ProtoMessage()

func (*LinkConfig) Reset

func (m *LinkConfig) Reset()

func (*LinkConfig) Size

func (m *LinkConfig) Size() (n int)

func (*LinkConfig) String

func (m *LinkConfig) String() string

func (*LinkConfig) Unmarshal

func (m *LinkConfig) Unmarshal(dAtA []byte) error

func (*LinkConfig) XXX_DiscardUnknown

func (m *LinkConfig) XXX_DiscardUnknown()

func (*LinkConfig) XXX_Marshal

func (m *LinkConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LinkConfig) XXX_Merge

func (m *LinkConfig) XXX_Merge(src proto.Message)

func (*LinkConfig) XXX_Size

func (m *LinkConfig) XXX_Size() int

func (*LinkConfig) XXX_Unmarshal

func (m *LinkConfig) XXX_Unmarshal(b []byte) error

type LinkDetails

type LinkDetails struct {
	Data map[string]interface{}
}

LinkDetails contains the details of a link

type Nonce

type Nonce struct {
	DesmosAddress  string
	Value          string
	ExpirationTime time.Time
}

func CreateNonce

func CreateNonce(desmosAddress string) (*Nonce, error)

CreateNonce creates a new nonce for the given Desmos address

func NewNonce

func NewNonce(desmosAddress string, value string, expirationTime time.Time) *Nonce

NewNonce returns a new Nonce instance

type Notification

type Notification struct {
	// Notification is the notification to be sent
	Notification *messaging.Notification `json:"notification,omitempty"`

	// Data is any additional data that should be sent along with the notification
	Data map[string]string `json:"data,omitempty"`

	// Whether the data inside Notification should be merged inside the Data field.
	// If set to true, the Notification will be set to nil when sending the notification to clients
	MergeNotificationWithData bool `json:"merge_notification_with_data,omitempty"`

	Android *messaging.AndroidConfig `json:"android_config,omitempty"`
	WebPush *messaging.WebpushConfig `json:"web_push_config,omitempty"`
	APNS    *messaging.APNSConfig    `json:"apns_config,omitempty"`
}

func (*Notification) Validate

func (n *Notification) Validate() error

type OpenGraphConfig

type OpenGraphConfig struct {
	Title       string `protobuf:"bytes,1,opt,name=title,proto3" json:"$og_title,omitempty"`
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"$og_description,omitempty"`
	ImageUrl    string `protobuf:"bytes,3,opt,name=image_url,json=imageUrl,proto3" json:"$og_image_url,omitempty"`
}

OpenGraphConfig contains the Open Graph properties that will be added to the generated link

func (*OpenGraphConfig) Descriptor

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

func (*OpenGraphConfig) GetDescription

func (m *OpenGraphConfig) GetDescription() string

func (*OpenGraphConfig) GetImageUrl

func (m *OpenGraphConfig) GetImageUrl() string

func (*OpenGraphConfig) GetTitle

func (m *OpenGraphConfig) GetTitle() string

func (*OpenGraphConfig) Marshal

func (m *OpenGraphConfig) Marshal() (dAtA []byte, err error)

func (*OpenGraphConfig) MarshalTo

func (m *OpenGraphConfig) MarshalTo(dAtA []byte) (int, error)

func (*OpenGraphConfig) MarshalToSizedBuffer

func (m *OpenGraphConfig) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*OpenGraphConfig) ProtoMessage

func (*OpenGraphConfig) ProtoMessage()

func (*OpenGraphConfig) Reset

func (m *OpenGraphConfig) Reset()

func (*OpenGraphConfig) Size

func (m *OpenGraphConfig) Size() (n int)

func (*OpenGraphConfig) String

func (m *OpenGraphConfig) String() string

func (*OpenGraphConfig) Unmarshal

func (m *OpenGraphConfig) Unmarshal(dAtA []byte) error

func (*OpenGraphConfig) XXX_DiscardUnknown

func (m *OpenGraphConfig) XXX_DiscardUnknown()

func (*OpenGraphConfig) XXX_Marshal

func (m *OpenGraphConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*OpenGraphConfig) XXX_Merge

func (m *OpenGraphConfig) XXX_Merge(src proto.Message)

func (*OpenGraphConfig) XXX_Size

func (m *OpenGraphConfig) XXX_Size() int

func (*OpenGraphConfig) XXX_Unmarshal

func (m *OpenGraphConfig) XXX_Unmarshal(b []byte) error

type RedirectionsConfig

type RedirectionsConfig struct {
	// Change the redirect endpoint for all platforms - so you don't have to
	// enable it by platform. Note that Branch will forward all robots to this
	// URL, which overrides any OG tags entered in the link. System-wide Default
	// URL (set in Link Settings)
	FallbackUrl string `protobuf:"bytes,1,opt,name=fallback_url,json=fallbackUrl,proto3" json:"$fallback_url,omitempty"`
	// Redirect URL for desktop devices - mobile users will default to the app
	// store.
	DesktopUrl string `protobuf:"bytes,2,opt,name=desktop_url,json=desktopUrl,proto3" json:"$desktop_url,omitempty"`
	// Change the redirect endpoint for iOS App Store page for your app (set in
	// Link Settings)
	IosUrl string `protobuf:"bytes,3,opt,name=ios_url,json=iosUrl,proto3" json:"$ios_url,omitempty"`
	// Change the redirect endpoint for Android Play Store page for your app (set
	// in Link Settings)
	AndroidUrl string `protobuf:"bytes,4,opt,name=android_url,json=androidUrl,proto3" json:"$android_url,omitempty"`
	// Force to open the $fallback_url instead of the app
	WebOnly bool `protobuf:"varint,5,opt,name=web_only,json=webOnly,proto3" json:"$web_only,omitempty"`
	// Force to open the $windows_desktop_url, $mac_desktop_url, $desktop_url, or
	// $fallback_url in this order of precedence instead of the app
	DesktopWebOnly bool `protobuf:"varint,6,opt,name=desktop_web_only,json=desktopWebOnly,proto3" json:"$desktop_web_only,omitempty"`
	// Force to open the $ios_url, $android_url, or $fallback_url in this order of
	// precedence instead of the app
	MobileWebOnly bool `protobuf:"varint,7,opt,name=mobile_web_only,json=mobileWebOnly,proto3" json:"$mobile_web_only,omitempty"`
}

RedirectionsConfig contains the redirections that will be added to the generated link

func (*RedirectionsConfig) Descriptor

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

func (*RedirectionsConfig) GetAndroidUrl

func (m *RedirectionsConfig) GetAndroidUrl() string

func (*RedirectionsConfig) GetDesktopUrl

func (m *RedirectionsConfig) GetDesktopUrl() string

func (*RedirectionsConfig) GetDesktopWebOnly

func (m *RedirectionsConfig) GetDesktopWebOnly() bool

func (*RedirectionsConfig) GetFallbackUrl

func (m *RedirectionsConfig) GetFallbackUrl() string

func (*RedirectionsConfig) GetIosUrl

func (m *RedirectionsConfig) GetIosUrl() string

func (*RedirectionsConfig) GetMobileWebOnly

func (m *RedirectionsConfig) GetMobileWebOnly() bool

func (*RedirectionsConfig) GetWebOnly

func (m *RedirectionsConfig) GetWebOnly() bool

func (*RedirectionsConfig) Marshal

func (m *RedirectionsConfig) Marshal() (dAtA []byte, err error)

func (*RedirectionsConfig) MarshalTo

func (m *RedirectionsConfig) MarshalTo(dAtA []byte) (int, error)

func (*RedirectionsConfig) MarshalToSizedBuffer

func (m *RedirectionsConfig) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RedirectionsConfig) ProtoMessage

func (*RedirectionsConfig) ProtoMessage()

func (*RedirectionsConfig) Reset

func (m *RedirectionsConfig) Reset()

func (*RedirectionsConfig) Size

func (m *RedirectionsConfig) Size() (n int)

func (*RedirectionsConfig) String

func (m *RedirectionsConfig) String() string

func (*RedirectionsConfig) Unmarshal

func (m *RedirectionsConfig) Unmarshal(dAtA []byte) error

func (*RedirectionsConfig) XXX_DiscardUnknown

func (m *RedirectionsConfig) XXX_DiscardUnknown()

func (*RedirectionsConfig) XXX_Marshal

func (m *RedirectionsConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RedirectionsConfig) XXX_Merge

func (m *RedirectionsConfig) XXX_Merge(src proto.Message)

func (*RedirectionsConfig) XXX_Size

func (m *RedirectionsConfig) XXX_Size() int

func (*RedirectionsConfig) XXX_Unmarshal

func (m *RedirectionsConfig) XXX_Unmarshal(b []byte) error

type SentNotification

type SentNotification struct {
	ID            string
	AppID         string
	UserAddresses []string
	Notification  *Notification
	SendTime      time.Time
}

func NewSentNotification

func NewSentNotification(appID string, userAddresses []string, notification *Notification) *SentNotification

type SignedRequest

type SignedRequest struct {
	// DesmosAddress represents the Bech23-encoded Desmos address of the user
	DesmosAddress string `protobuf:"bytes,1,opt,name=desmos_address,json=desmosAddress,proto3" json:"desmos_address,omitempty"`
	// SignedBytes represents the hex-encoded bytes that were signed by the user
	SignedBytes string `protobuf:"bytes,2,opt,name=signed_bytes,json=signedBytes,proto3" json:"signed_bytes,omitempty"`
	// PubKeyBytes represents the hex-encoded bytes of the public key associated
	// to the private key that was used to sign the data
	PubKeyBytes string `protobuf:"bytes,3,opt,name=pub_key_bytes,json=pubKeyBytes,proto3" json:"pub_key_bytes,omitempty"`
	// SignatureBytes represents the hex-encoded bytes that are resulting from the
	// signature of the data
	SignatureBytes string `protobuf:"bytes,4,opt,name=signature_bytes,json=signatureBytes,proto3" json:"signature_bytes,omitempty"`
}

func (*SignedRequest) Descriptor

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

func (*SignedRequest) GetDesmosAddress

func (m *SignedRequest) GetDesmosAddress() string

func (*SignedRequest) GetPubKeyBytes

func (m *SignedRequest) GetPubKeyBytes() string

func (*SignedRequest) GetSignatureBytes

func (m *SignedRequest) GetSignatureBytes() string

func (*SignedRequest) GetSignedBytes

func (m *SignedRequest) GetSignedBytes() string

func (*SignedRequest) Marshal

func (m *SignedRequest) Marshal() (dAtA []byte, err error)

func (*SignedRequest) MarshalTo

func (m *SignedRequest) MarshalTo(dAtA []byte) (int, error)

func (*SignedRequest) MarshalToSizedBuffer

func (m *SignedRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*SignedRequest) ProtoMessage

func (*SignedRequest) ProtoMessage()

func (*SignedRequest) Reset

func (m *SignedRequest) Reset()

func (*SignedRequest) Size

func (m *SignedRequest) Size() (n int)

func (*SignedRequest) String

func (m *SignedRequest) String() string

func (*SignedRequest) Unmarshal

func (m *SignedRequest) Unmarshal(dAtA []byte) error

func (*SignedRequest) Verify

func (r *SignedRequest) Verify(cdc codec.Codec, amino *codec.LegacyAmino) (signedMemo string, err error)

func (*SignedRequest) XXX_DiscardUnknown

func (m *SignedRequest) XXX_DiscardUnknown()

func (*SignedRequest) XXX_Marshal

func (m *SignedRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SignedRequest) XXX_Merge

func (m *SignedRequest) XXX_Merge(src proto.Message)

func (*SignedRequest) XXX_Size

func (m *SignedRequest) XXX_Size() int

func (*SignedRequest) XXX_Unmarshal

func (m *SignedRequest) XXX_Unmarshal(b []byte) error

type TwitterConfig

type TwitterConfig struct {
	CardType    string `protobuf:"bytes,1,opt,name=card_type,json=cardType,proto3" json:"$twitter_card,omitempty"`
	Title       string `protobuf:"bytes,2,opt,name=title,proto3" json:"$twitter_title,omitempty"`
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"$twitter_description,omitempty"`
	ImageUrl    string `protobuf:"bytes,4,opt,name=image_url,json=imageUrl,proto3" json:"$twitter_image_url,omitempty"`
}

TwitterConfig contains the Twitter properties that will be added to the generated link

func (*TwitterConfig) Descriptor

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

func (*TwitterConfig) GetCardType

func (m *TwitterConfig) GetCardType() string

func (*TwitterConfig) GetDescription

func (m *TwitterConfig) GetDescription() string

func (*TwitterConfig) GetImageUrl

func (m *TwitterConfig) GetImageUrl() string

func (*TwitterConfig) GetTitle

func (m *TwitterConfig) GetTitle() string

func (*TwitterConfig) Marshal

func (m *TwitterConfig) Marshal() (dAtA []byte, err error)

func (*TwitterConfig) MarshalTo

func (m *TwitterConfig) MarshalTo(dAtA []byte) (int, error)

func (*TwitterConfig) MarshalToSizedBuffer

func (m *TwitterConfig) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TwitterConfig) ProtoMessage

func (*TwitterConfig) ProtoMessage()

func (*TwitterConfig) Reset

func (m *TwitterConfig) Reset()

func (*TwitterConfig) Size

func (m *TwitterConfig) Size() (n int)

func (*TwitterConfig) String

func (m *TwitterConfig) String() string

func (*TwitterConfig) Unmarshal

func (m *TwitterConfig) Unmarshal(dAtA []byte) error

func (*TwitterConfig) XXX_DiscardUnknown

func (m *TwitterConfig) XXX_DiscardUnknown()

func (*TwitterConfig) XXX_Marshal

func (m *TwitterConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TwitterConfig) XXX_Merge

func (m *TwitterConfig) XXX_Merge(src proto.Message)

func (*TwitterConfig) XXX_Size

func (m *TwitterConfig) XXX_Size() int

func (*TwitterConfig) XXX_Unmarshal

func (m *TwitterConfig) XXX_Unmarshal(b []byte) error

type UserNotificationDeviceToken

type UserNotificationDeviceToken struct {
	UserAddress string
	DeviceToken string
}

UserNotificationDeviceToken represents a notification device token that is associated to a user

func NewUserNotificationDeviceToken

func NewUserNotificationDeviceToken(userAddress, deviceToken string) *UserNotificationDeviceToken

type UserSession

type UserSession struct {
	DesmosAddress string
	Token         string
	CreationDate  time.Time
	ExpiryTime    time.Time
}

func CreateUserSession

func CreateUserSession(desmosAddress string) (*UserSession, error)

CreateUserSession creates a new session for the user having the given Desmos address

func NewUserSession

func NewUserSession(desmosAddress string, token string, creationDate time.Time, expiryTime time.Time) *UserSession

NewUserSession returns a new UserSession instance

Jump to

Keyboard shortcuts

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