nonce

package
v1.0.15 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: MIT Imports: 3 Imported by: 0

README

GoCryptoTrader package Nonce

Build Status Software License GoDoc Coverage Status Go Report Card

This nonce package is part of the GoCryptoTrader codebase.

This is still in active development

You can track ideas, planned features and what's in progress on this Trello board: https://trello.com/b/ZAhMhpOy/gocryptotrader.

Join our slack to discuss all things related to GoCryptoTrader! GoCryptoTrader Slack

Current Features for nonce

  • This package services the exchanges package with nonce creation.
Please click GoDocs chevron above to view current GoDoc information for this package

Contribution

Please feel free to submit any pull requests or suggest any desired features to be added.

When submitting a PR, please abide by our coding guidelines:

  • Code must adhere to the official Go formatting guidelines (i.e. uses gofmt).
  • Code must be documented adhering to the official Go commentary guidelines.
  • Code must adhere to our coding style.
  • Pull requests need to be based on and opened against the master branch.

Donations

If this framework helped you in any way, or you would like to support the developers working on it, please donate Bitcoin to:

bc1qk0jareu4jytc0cfrhr5wgshsq8282awpavfahc

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Nonce

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

Nonce struct holds the nonce value

func (*Nonce) GetAndIncrement

func (n *Nonce) GetAndIncrement(set Setter) Value

GetAndIncrement returns the current nonce value and increments it. If value is 0, it will set the value to the current time.

type Setter

type Setter func() int64

Setter is a function that returns a nonce start value.

var (
	UnixNano Setter = func() int64 { return time.Now().UnixNano() }
	Unix     Setter = func() int64 { return time.Now().Unix() }
)

UnixNano and Unix are default nonce setters

type Value

type Value int64

Value is a return type for GetValue

func (Value) String

func (v Value) String() string

String is a Value method that changes format to a string

Jump to

Keyboard shortcuts

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