GoCsObject

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

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

Go to latest
Published: May 19, 2022 License: MIT Imports: 7 Imported by: 0

README

GoCsObject

Official Critsend Golang Object

Documentation

Index

Constants

View Source
const (
	ApiUrl   = "https://api.critsend.io/"
	ApiToken = ""
)

Variables

This section is empty.

Functions

func CompareObject

func CompareObject(apiName string) map[string]interface{}

func GetObjectFromApi

func GetObjectFromApi(url string) []byte

Types

type AutoGenerated

type AutoGenerated struct {
	Error   []interface{} `json:"error"`
	Info    []interface{} `json:"info"`
	Title   string        `json:"title"`
	History []struct {
		Code string `json:"code"`
		Info string `json:"info"`
	} `json:"history"`
	Description string                 `json:"description"`
	Parameters  map[string]interface{} `json:"parameters"`
}

type Ip

type Ip struct {
	Id        int    `json:"ip_id,omitempty"`
	Value     string `json:"ip_value"`
	Reverse   string `json:"ip_reverse,omitempty"`
	Create    string `json:"ip_create,omitempty"`
	Update    string `json:"ip_update,omitempty"`
	Server    int    `json:"server_id,omitempty"`
	Removable bool   `json:"is_removable"`
	User      int    `json:"user_id,omitempty"`
	City      int    `json:"city_id,omitempty"`
	Lat       string `json:"ip_lat,omitempty"`
	Long      string `json:"ip_long,omitempty"`
	Company   int    `json:"company_id,omitempty"`
	Status    int    `json:"ip_status_id,omitempty"`
}

func NewIpById

func NewIpById(value int, fromApi bool) (i *Ip, err error)

NewIpById Constructor to build object by ID, if fromApi = true, try to load from API

func NewIpByValue

func NewIpByValue(value string, fromApi bool) (i *Ip, err error)

NewIpByValue Constructor to build object by Value, if fromApi = true, try to load from API

func (*Ip) Delete

func (o *Ip) Delete()

Delete Function used to Delete the Object to Api

func (*Ip) Load

func (o *Ip) Load() (err error)

Load Function used to load the Object to Api

func (*Ip) Save

func (o *Ip) Save()

Save Function used to save the Object to Api

type ObjectField

type ObjectField struct {
	Name string
	Type types.BasicKind
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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