Documentation
¶
Index ¶
- Variables
- func Arch() string
- func HostName() (string, error)
- func ID() (string, error)
- func Init(options ...Option) error
- func IsAndroid() bool
- func IsDesktop() bool
- func IsIOS() bool
- func IsLinux() bool
- func IsMacOS() bool
- func IsMobile() bool
- func IsWindows() bool
- func NewDefaultLocation() *t.Location
- func NewDefaultProfile(options ...DefaultProfileOption) *t.Profile
- func Platform() string
- func Stat() (map[string]string, error)
- type CallbackImpl
- type Configuration
- type DefaultProfileOption
- type Option
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Path Manipulation Errors ErrDuplicateFilePathOption = errors.New("Duplicate file path option") ErrPrefixSuffixSetWithReplace = errors.New("Prefix or Suffix set with Replace.") ErrSeparatorLength = errors.New("Separator length must be 1.") ErrNoFileNameSet = errors.New("File name was not set by options.") // Device ID Errors ErrEmptyDeviceID = errors.New("Device ID cannot be empty") ErrMissingEnvVar = errors.New("Cannot set EnvVariable with empty value") // Directory errors ErrDirectoryInvalid = errors.New("Directory Type is invalid") ErrDirectoryUnset = errors.New("Directory path has not been set") ErrDirectoryJoin = errors.New("Failed to join directory path") // Node Errors ErrEmptyQueue = errors.New("No items in Transfer Queue.") ErrInvalidQuery = errors.New("No SName or PeerID provided.") ErrMissingParam = errors.New("Paramater is missing.") ErrProtocolsNotSet = errors.New("Node Protocol has not been initialized.") ErrRoutingNotSet = errors.New("DHT and Host have not been set by Routing Function") ErrListenerRequired = errors.New("Listener was not Provided") ErrMDNSInvalidConn = errors.New("Invalid Connection, cannot begin MDNS Service") // Default P2P Properties BootstrapAddrStrs = []string{ "/dnsaddr/bootstrap.libp2p.io/p2p/QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN", "/dnsaddr/bootstrap.libp2p.io/p2p/QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa", "/dnsaddr/bootstrap.libp2p.io/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb", "/dnsaddr/bootstrap.libp2p.io/p2p/QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt", "/ip4/104.131.131.82/tcp/4001/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ", "/ip4/104.131.131.82/udp/4001/quic/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ", } AddrStoreTTL = time.Minute * 5 )
Functions ¶
func IsDesktop ¶
func IsDesktop() bool
IsDesktop returns true if the current platform is ANY desktop platform.
func IsMobile ¶
func IsMobile() bool
IsMobile returns true if the current platform is ANY mobile platform.
func NewDefaultLocation ¶
NewDefaultLocation returns the Sonr HQ as default location
func NewDefaultProfile ¶
func NewDefaultProfile(options ...DefaultProfileOption) *t.Profile
NewDefaultProfile creates a new default Profile
Types ¶
type CallbackImpl ¶
type CallbackImpl interface { // OnRefresh is called when the LobbyProtocol is refreshed and pushes a RefreshEvent OnRefresh(event *mv1.OnLobbyRefreshResponse) // OnMailbox is called when the MailboxProtocol receives a MailboxEvent OnMailbox(event *mv1.OnMailboxMessageResponse) // OnInvite is called when the TransferProtocol receives InviteEvent OnInvite(event *mv1.OnTransmitInviteResponse) // OnDecision is called when the TransferProtocol receives a DecisionEvent OnDecision(event *mv1.OnTransmitDecisionResponse, invite *mv1.OnTransmitInviteResponse) // OnProgress is called when the TransferProtocol sends or receives a ProgressEvent OnProgress(event *mv1.OnTransmitProgressResponse) // OnTransfer is called when the TransferProtocol completes a transfer and pushes a CompleteEvent OnComplete(event *mv1.OnTransmitCompleteResponse) }
CallbackImpl is the implementation of Callback interface
type Configuration ¶
type Configuration struct {
// contains filtered or unexported fields
}
func DefaultConfiguration ¶
func DefaultConfiguration() *Configuration
type DefaultProfileOption ¶
type DefaultProfileOption func(profileOpts)
DefaultProfileOption is a type for Profile Options
func WithCheckerProfile ¶
func WithCheckerProfile(profile *t.Profile) DefaultProfileOption
WithCheckerProfile sets the checker profile
type Option ¶
type Option func(o *options)
func WithSupportPath ¶
WithSupportPath sets the Support Directory
Click to show internal directories.
Click to hide internal directories.