links

package
v0.0.0-...-eec4b17 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: 20 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthService        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowService          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupService = fmt.Errorf("proto: unexpected end of group")
)
View Source
var ChainType_name = map[int32]string{
	0: "UNDEFINED",
	1: "MAINNET",
	2: "TESTNET",
}
View Source
var ChainType_value = map[string]int32{
	"UNDEFINED": 0,
	"MAINNET":   1,
	"TESTNET":   2,
}

Functions

func RegisterLinksServiceServer

func RegisterLinksServiceServer(s grpc1.Server, srv LinksServiceServer)

Types

type ChainType

type ChainType int32

ChainType represents the types of chain supported while creating links

const (
	ChainType_UNDEFINED ChainType = 0
	ChainType_MAINNET   ChainType = 1
	ChainType_TESTNET   ChainType = 2
)

func (ChainType) EnumDescriptor

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

func (ChainType) String

func (x ChainType) String() string

type CreateAddressLinkRequest

type CreateAddressLinkRequest struct {
	// Address of the user for which the link should be created
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// Chain that the receiving user should use when performing operations
	// associated to the given address
	Chain ChainType `protobuf:"varint,2,opt,name=chain,proto3,enum=caerus.links.v1.ChainType" json:"chain,omitempty"`
}

CreateAddressLinkRequest contains the data used to create a deep link for a given address

func (*CreateAddressLinkRequest) Descriptor

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

func (*CreateAddressLinkRequest) GetAddress

func (m *CreateAddressLinkRequest) GetAddress() string

func (*CreateAddressLinkRequest) GetChain

func (m *CreateAddressLinkRequest) GetChain() ChainType

func (*CreateAddressLinkRequest) Marshal

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

func (*CreateAddressLinkRequest) MarshalTo

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

func (*CreateAddressLinkRequest) MarshalToSizedBuffer

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

func (*CreateAddressLinkRequest) ProtoMessage

func (*CreateAddressLinkRequest) ProtoMessage()

func (*CreateAddressLinkRequest) Reset

func (m *CreateAddressLinkRequest) Reset()

func (*CreateAddressLinkRequest) Size

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

func (*CreateAddressLinkRequest) String

func (m *CreateAddressLinkRequest) String() string

func (*CreateAddressLinkRequest) Unmarshal

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

func (*CreateAddressLinkRequest) XXX_DiscardUnknown

func (m *CreateAddressLinkRequest) XXX_DiscardUnknown()

func (*CreateAddressLinkRequest) XXX_Marshal

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

func (*CreateAddressLinkRequest) XXX_Merge

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

func (*CreateAddressLinkRequest) XXX_Size

func (m *CreateAddressLinkRequest) XXX_Size() int

func (*CreateAddressLinkRequest) XXX_Unmarshal

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

type CreateLinkRequest

type CreateLinkRequest struct {
	// The configuration of the link to be created
	LinkConfiguration *types1.LinkConfig `protobuf:"bytes,1,opt,name=link_configuration,json=linkConfiguration,proto3" json:"link_configuration,omitempty"`
	// API key used to create the link.
	ApiKey string `protobuf:"bytes,2,opt,name=api_key,json=apiKey,proto3" json:"api_key,omitempty"`
}

CreateLinkRequest contains the data used to create a generic deep link

func (*CreateLinkRequest) Descriptor

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

func (*CreateLinkRequest) GetApiKey

func (m *CreateLinkRequest) GetApiKey() string

func (*CreateLinkRequest) GetLinkConfiguration

func (m *CreateLinkRequest) GetLinkConfiguration() *types1.LinkConfig

func (*CreateLinkRequest) Marshal

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

func (*CreateLinkRequest) MarshalTo

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

func (*CreateLinkRequest) MarshalToSizedBuffer

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

func (*CreateLinkRequest) ProtoMessage

func (*CreateLinkRequest) ProtoMessage()

func (*CreateLinkRequest) Reset

func (m *CreateLinkRequest) Reset()

func (*CreateLinkRequest) Size

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

func (*CreateLinkRequest) String

func (m *CreateLinkRequest) String() string

func (*CreateLinkRequest) Unmarshal

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

func (*CreateLinkRequest) XXX_DiscardUnknown

func (m *CreateLinkRequest) XXX_DiscardUnknown()

func (*CreateLinkRequest) XXX_Marshal

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

func (*CreateLinkRequest) XXX_Merge

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

func (*CreateLinkRequest) XXX_Size

func (m *CreateLinkRequest) XXX_Size() int

func (*CreateLinkRequest) XXX_Unmarshal

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

type CreateLinkResponse

type CreateLinkResponse struct {
	// URL of the generated link
	Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
}

CreateLinkResponse contains the data returned by the CreateLink method

func (*CreateLinkResponse) Descriptor

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

func (*CreateLinkResponse) GetUrl

func (m *CreateLinkResponse) GetUrl() string

func (*CreateLinkResponse) Marshal

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

func (*CreateLinkResponse) MarshalTo

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

func (*CreateLinkResponse) MarshalToSizedBuffer

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

func (*CreateLinkResponse) ProtoMessage

func (*CreateLinkResponse) ProtoMessage()

func (*CreateLinkResponse) Reset

func (m *CreateLinkResponse) Reset()

func (*CreateLinkResponse) Size

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

func (*CreateLinkResponse) String

func (m *CreateLinkResponse) String() string

func (*CreateLinkResponse) Unmarshal

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

func (*CreateLinkResponse) XXX_DiscardUnknown

func (m *CreateLinkResponse) XXX_DiscardUnknown()

func (*CreateLinkResponse) XXX_Marshal

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

func (*CreateLinkResponse) XXX_Merge

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

func (*CreateLinkResponse) XXX_Size

func (m *CreateLinkResponse) XXX_Size() int

func (*CreateLinkResponse) XXX_Unmarshal

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

type CreateSendLinkRequest

type CreateSendLinkRequest struct {
	// Address of the user that should receive the tokens
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// Chain on which the tokens should be sent
	Chain ChainType `protobuf:"varint,2,opt,name=chain,proto3,enum=caerus.links.v1.ChainType" json:"chain,omitempty"`
	// Optional amount to be sent to the user when opening the link
	Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"`
}

CreateSendLinkRequest contains the data used to create a deep link to send tokens to a user

func (*CreateSendLinkRequest) Descriptor

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

func (*CreateSendLinkRequest) GetAddress

func (m *CreateSendLinkRequest) GetAddress() string

func (*CreateSendLinkRequest) GetAmount

func (*CreateSendLinkRequest) GetChain

func (m *CreateSendLinkRequest) GetChain() ChainType

func (*CreateSendLinkRequest) Marshal

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

func (*CreateSendLinkRequest) MarshalTo

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

func (*CreateSendLinkRequest) MarshalToSizedBuffer

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

func (*CreateSendLinkRequest) ProtoMessage

func (*CreateSendLinkRequest) ProtoMessage()

func (*CreateSendLinkRequest) Reset

func (m *CreateSendLinkRequest) Reset()

func (*CreateSendLinkRequest) Size

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

func (*CreateSendLinkRequest) String

func (m *CreateSendLinkRequest) String() string

func (*CreateSendLinkRequest) Unmarshal

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

func (*CreateSendLinkRequest) XXX_DiscardUnknown

func (m *CreateSendLinkRequest) XXX_DiscardUnknown()

func (*CreateSendLinkRequest) XXX_Marshal

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

func (*CreateSendLinkRequest) XXX_Merge

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

func (*CreateSendLinkRequest) XXX_Size

func (m *CreateSendLinkRequest) XXX_Size() int

func (*CreateSendLinkRequest) XXX_Unmarshal

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

type CreateViewProfileLinkRequest

type CreateViewProfileLinkRequest struct {
	// Address of the user whose profile should be viewed
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// Chain on which the profile should be viewed
	Chain ChainType `protobuf:"varint,2,opt,name=chain,proto3,enum=caerus.links.v1.ChainType" json:"chain,omitempty"`
}

CreateViewProfileLinkRequest contains the data used to create a deep link to view a user's profile

func (*CreateViewProfileLinkRequest) Descriptor

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

func (*CreateViewProfileLinkRequest) GetAddress

func (m *CreateViewProfileLinkRequest) GetAddress() string

func (*CreateViewProfileLinkRequest) GetChain

func (*CreateViewProfileLinkRequest) Marshal

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

func (*CreateViewProfileLinkRequest) MarshalTo

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

func (*CreateViewProfileLinkRequest) MarshalToSizedBuffer

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

func (*CreateViewProfileLinkRequest) ProtoMessage

func (*CreateViewProfileLinkRequest) ProtoMessage()

func (*CreateViewProfileLinkRequest) Reset

func (m *CreateViewProfileLinkRequest) Reset()

func (*CreateViewProfileLinkRequest) Size

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

func (*CreateViewProfileLinkRequest) String

func (*CreateViewProfileLinkRequest) Unmarshal

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

func (*CreateViewProfileLinkRequest) XXX_DiscardUnknown

func (m *CreateViewProfileLinkRequest) XXX_DiscardUnknown()

func (*CreateViewProfileLinkRequest) XXX_Marshal

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

func (*CreateViewProfileLinkRequest) XXX_Merge

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

func (*CreateViewProfileLinkRequest) XXX_Size

func (m *CreateViewProfileLinkRequest) XXX_Size() int

func (*CreateViewProfileLinkRequest) XXX_Unmarshal

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

type Database

type Database interface {
	GetAppDeepLinksRateLimit(appID string) (uint64, error)
	GetAppDeepLinksCount(appID string) (uint64, error)

	SaveCreatedDeepLink(link *types.CreatedDeepLink) error
	GetDeepLinkConfig(link string) (*types.LinkConfig, error)
}

type DeepLinksClient

type DeepLinksClient interface {
	CreateDynamicLink(apiKey string, linkConfig *types.LinkConfig) (string, error)
}

type GenerateAddressLinkRequest

type GenerateAddressLinkRequest struct {
	// ID of the app that is trying to generate the link
	AppID string

	// Address that should be associated to the link
	Address string

	// Chain represents the chain type that should be associated to the link
	Chain ChainType
}

GenerateAddressLinkRequest represents a request to generate a deep link that allows the user to decide what operations

func NewGenerateAddressLinkRequest

func NewGenerateAddressLinkRequest(appID string, address string, chainType ChainType) *GenerateAddressLinkRequest

func (*GenerateAddressLinkRequest) GetAction

func (r *GenerateAddressLinkRequest) GetAction() string

func (*GenerateAddressLinkRequest) GetAppID

func (r *GenerateAddressLinkRequest) GetAppID() string

func (*GenerateAddressLinkRequest) GetChainType

func (r *GenerateAddressLinkRequest) GetChainType() ChainType

func (*GenerateAddressLinkRequest) GetCustomData

func (r *GenerateAddressLinkRequest) GetCustomData() map[string]string

func (*GenerateAddressLinkRequest) Validate

func (r *GenerateAddressLinkRequest) Validate() error

type GenerateDeepLinkRequest

type GenerateDeepLinkRequest interface {
	// GetAppID returns the id of the app that is trying to generate the link
	GetAppID() string

	// GetAction returns the action associated to the link
	GetAction() string

	// GetChainType returns the chain type that should be associated to the link
	GetChainType() ChainType

	// GetCustomData returns the custom data that should be associated to the link
	GetCustomData() map[string]string

	// Validate checks if the request is valid or not
	Validate() error
}

type GenerateGenericDeepLinkRequest

type GenerateGenericDeepLinkRequest struct {
	// ID of the app that is trying to generate the link
	AppID string

	// Configuration used to generate the link
	LinkConfig *types.LinkConfig

	// (optional) API key used to generate the link
	ApiKey string
}

func NewGenerateGenericDeepLinkRequest

func NewGenerateGenericDeepLinkRequest(appID string, config *types.LinkConfig, apiKey string) *GenerateGenericDeepLinkRequest

func (*GenerateGenericDeepLinkRequest) Validate

func (r *GenerateGenericDeepLinkRequest) Validate() error

type GenerateSendTokensLinkRequest

type GenerateSendTokensLinkRequest struct {
	// ID of the app that is trying to generate the link
	AppID string

	// Address that should be associated to the link
	Address string

	// Chain represents the chain type that should be associated to the link
	Chain ChainType

	// (optional) Amount of tokens that should be sent
	Amount sdk.Coins
}

func NewGenerateSendTokensLinkRequest

func NewGenerateSendTokensLinkRequest(appID string, address string, chainType ChainType, amount sdk.Coins) *GenerateSendTokensLinkRequest

func (*GenerateSendTokensLinkRequest) GetAction

func (r *GenerateSendTokensLinkRequest) GetAction() string

func (*GenerateSendTokensLinkRequest) GetAppID

func (r *GenerateSendTokensLinkRequest) GetAppID() string

func (*GenerateSendTokensLinkRequest) GetChainType

func (r *GenerateSendTokensLinkRequest) GetChainType() ChainType

func (*GenerateSendTokensLinkRequest) GetCustomData

func (r *GenerateSendTokensLinkRequest) GetCustomData() map[string]string

func (*GenerateSendTokensLinkRequest) Validate

func (r *GenerateSendTokensLinkRequest) Validate() error

type GenerateViewProfileLinkRequest

type GenerateViewProfileLinkRequest struct {
	// ID of the app that is trying to generate the link
	AppID string

	// Address that should be associated to the link
	Address string

	// Chain represents the chain type that should be associated to the link
	Chain ChainType
}

func NewGenerateViewProfileLinkRequest

func NewGenerateViewProfileLinkRequest(appID string, address string, chainType ChainType) *GenerateViewProfileLinkRequest

func (*GenerateViewProfileLinkRequest) GetAction

func (r *GenerateViewProfileLinkRequest) GetAction() string

func (*GenerateViewProfileLinkRequest) GetAppID

func (r *GenerateViewProfileLinkRequest) GetAppID() string

func (*GenerateViewProfileLinkRequest) GetChainType

func (r *GenerateViewProfileLinkRequest) GetChainType() ChainType

func (*GenerateViewProfileLinkRequest) GetCustomData

func (r *GenerateViewProfileLinkRequest) GetCustomData() map[string]string

func (*GenerateViewProfileLinkRequest) Validate

func (r *GenerateViewProfileLinkRequest) Validate() error

type GetLinkConfigRequest

type GetLinkConfigRequest struct {
	// URL of the link to get the details of
	Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
}

GetLinkConfigRequest contains the data used to get the configuration used to generate a given link

func (*GetLinkConfigRequest) Descriptor

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

func (*GetLinkConfigRequest) GetUrl

func (m *GetLinkConfigRequest) GetUrl() string

func (*GetLinkConfigRequest) Marshal

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

func (*GetLinkConfigRequest) MarshalTo

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

func (*GetLinkConfigRequest) MarshalToSizedBuffer

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

func (*GetLinkConfigRequest) ProtoMessage

func (*GetLinkConfigRequest) ProtoMessage()

func (*GetLinkConfigRequest) Reset

func (m *GetLinkConfigRequest) Reset()

func (*GetLinkConfigRequest) Size

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

func (*GetLinkConfigRequest) String

func (m *GetLinkConfigRequest) String() string

func (*GetLinkConfigRequest) Unmarshal

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

func (*GetLinkConfigRequest) XXX_DiscardUnknown

func (m *GetLinkConfigRequest) XXX_DiscardUnknown()

func (*GetLinkConfigRequest) XXX_Marshal

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

func (*GetLinkConfigRequest) XXX_Merge

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

func (*GetLinkConfigRequest) XXX_Size

func (m *GetLinkConfigRequest) XXX_Size() int

func (*GetLinkConfigRequest) XXX_Unmarshal

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

type Handler

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

func NewHandler

func NewHandler(client DeepLinksClient, db Database) *Handler

NewHandler allows to build a new Handler instance

func NewHandlerFromEnvVariables

func NewHandlerFromEnvVariables(client DeepLinksClient, db Database) *Handler

NewHandlerFromEnvVariables returns a new Handler instance reading the config from the env variables

func (*Handler) HandleGenerateDeepLinkRequest

func (h *Handler) HandleGenerateDeepLinkRequest(request GenerateDeepLinkRequest) (*CreateLinkResponse, error)

HandleGenerateDeepLinkRequest handles the given GenerateDeepLinkRequest

func (*Handler) HandleGenerateGenericDeepLinkRequest

func (h *Handler) HandleGenerateGenericDeepLinkRequest(request *GenerateGenericDeepLinkRequest) (*CreateLinkResponse, error)

HandleGenerateGenericDeepLinkRequest handles the given GenerateDeepLinkRequest Note: This method does *NOT* check for deep link creation rate limit, as the application will have to provide its own API key to create the deep link. This means that the application will be rate limited by Branch itself.

func (*Handler) HandleGetLinkConfigRequest

func (h *Handler) HandleGetLinkConfigRequest(request *GetLinkConfigRequest) (*types.LinkConfig, error)

HandleGetLinkConfigRequest handles the given GetLinkConfigRequest

type LinksServiceClient

type LinksServiceClient interface {
	// CreateAddressLink allows to generate a new deep link that allows to open
	// the given address on the given chain and perform the action decided by the
	// user
	CreateAddressLink(ctx context.Context, in *CreateAddressLinkRequest, opts ...grpc.CallOption) (*CreateLinkResponse, error)
	// CreateViewProfileLink allows to generate a new deep link that allows to
	// view the profile of the given user
	CreateViewProfileLink(ctx context.Context, in *CreateViewProfileLinkRequest, opts ...grpc.CallOption) (*CreateLinkResponse, error)
	// CreateSendLink allows to generate a new deep link that allows to send
	// tokens to the given address
	CreateSendLink(ctx context.Context, in *CreateSendLinkRequest, opts ...grpc.CallOption) (*CreateLinkResponse, error)
	// CreateLink allows to generated a new deep link based on the given
	// configuration
	CreateLink(ctx context.Context, in *CreateLinkRequest, opts ...grpc.CallOption) (*CreateLinkResponse, error)
	// GetLinkConfig allows to get the configuration used to generate a link
	GetLinkConfig(ctx context.Context, in *GetLinkConfigRequest, opts ...grpc.CallOption) (*types1.LinkConfig, error)
}

LinksServiceClient is the client API for LinksService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewLinksServiceClient

func NewLinksServiceClient(cc grpc1.ClientConn) LinksServiceClient

type LinksServiceServer

type LinksServiceServer interface {
	// CreateAddressLink allows to generate a new deep link that allows to open
	// the given address on the given chain and perform the action decided by the
	// user
	CreateAddressLink(context.Context, *CreateAddressLinkRequest) (*CreateLinkResponse, error)
	// CreateViewProfileLink allows to generate a new deep link that allows to
	// view the profile of the given user
	CreateViewProfileLink(context.Context, *CreateViewProfileLinkRequest) (*CreateLinkResponse, error)
	// CreateSendLink allows to generate a new deep link that allows to send
	// tokens to the given address
	CreateSendLink(context.Context, *CreateSendLinkRequest) (*CreateLinkResponse, error)
	// CreateLink allows to generated a new deep link based on the given
	// configuration
	CreateLink(context.Context, *CreateLinkRequest) (*CreateLinkResponse, error)
	// GetLinkConfig allows to get the configuration used to generate a link
	GetLinkConfig(context.Context, *GetLinkConfigRequest) (*types1.LinkConfig, error)
}

LinksServiceServer is the server API for LinksService service.

type Server

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

func NewServer

func NewServer(handler *Handler) *Server

func NewServerFromEnvVariables

func NewServerFromEnvVariables(client DeepLinksClient, db Database) *Server

NewServerFromEnvVariables builds a new Server instance reading the config from the env variables

func (s *Server) CreateAddressLink(ctx context.Context, request *CreateAddressLinkRequest) (*CreateLinkResponse, error)

CreateAddressLink implements LinksServiceServer

func (s *Server) CreateLink(ctx context.Context, request *CreateLinkRequest) (*CreateLinkResponse, error)

CreateLink implements LinksServiceServer

func (s *Server) CreateSendLink(ctx context.Context, request *CreateSendLinkRequest) (*CreateLinkResponse, error)

CreateSendLink implements LinksServiceServer

func (s *Server) CreateViewProfileLink(ctx context.Context, request *CreateViewProfileLinkRequest) (*CreateLinkResponse, error)

CreateViewProfileLink implements LinksServiceServer

func (*Server) GetLinkConfig

func (s *Server) GetLinkConfig(_ context.Context, request *GetLinkConfigRequest) (*types.LinkConfig, error)

GetLinkConfig implements LinksServiceServer

type UnimplementedLinksServiceServer

type UnimplementedLinksServiceServer struct {
}

UnimplementedLinksServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedLinksServiceServer) GetLinkConfig

Directories

Path Synopsis
Package testutils is a generated GoMock package.
Package testutils is a generated GoMock package.

Jump to

Keyboard shortcuts

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