runtime

package module
v0.0.0-...-b0a84a3 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2021 License: GPL-3.0 Imports: 11 Imported by: 1

README

GoSnipe Sniper

Go Reference

DO NOT CLONE THIS UNLESS YOU ARE WRITING A CUSTOM FRONTEND FOR GOSNIPE.

Read that 3 times, DO NOT OPEN AN ISSUE UNLESS IT INVOLVES THIS REPO.

MCGoSnipe/Frontend is the frontend. Go there for using this without coding.

Documentation

Index

Constants

View Source
const (
	//MinecraftServicesAPIHost The hostname for Minecraft's API.
	MinecraftServicesAPIHost = "api.minecraftservices.com"
	//YggdrasilAuthURI The URI for Mojang's authentication server.
	YggdrasilAuthURI = "https://authserver.mojang.com"
	//MicrosoftLoginAPI The URI for logging in to a Microsoft account for Minecraft via MicroAuth.
	MicrosoftLoginAPI = "" /* 223-byte string literal not displayed */
)

Variables

This section is empty.

Functions

func AutoOffset

func AutoOffset(count ...int) *float64

AutoOffset Returns a floating-point offset based on connection speed or nil.

func GetDropTime

func GetDropTime(name string) *time.Time

GetDropTime gets the time.Time of when the inputted name drops. Returns nil upon error.

func SliceStrToBearers

func SliceStrToBearers(inputSlice []string) ([]string, []string, int)

SliceStrToBearers returns a list of bearers from the input provided alongside the count of bearers. function also will automatically answer security questions if provided.

func Snipe

func Snipe(config Configuration, ch chan SnipeRes)

Snipe snipes with config and sends response through the channel given.

func TextToSliceStr

func TextToSliceStr(path string) ([]string, int)

TextToSliceStr will return a slice of all the lines of the file, found at path, as strings. Also returns the number of lines read.

Types

type Configuration

type Configuration struct {
	Bearer    string
	Name      string
	Offset    float64
	Timestamp time.Time
	Label     *string
	Debug     bool
}

Configuration holds configuration for the sniper to use.

type SnipeRes

type SnipeRes struct {
	Sent   *time.Time
	Recv   *time.Time
	Status *int
	Label  *string
}

SnipeRes contains the data obtained after the snipe.

Jump to

Keyboard shortcuts

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