ircglineapi

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCidrToIP

func AddCidrToIP(ip string) string

Returns ip/32 if ipv4 address provided without cidr Returns ip/128 if ipv6 address provided without cidr Returns ip unchanged if char '/' is present in string ip

func Api_init

func Api_init() *echo.Echo

func GetFileNameFromFullPath

func GetFileNameFromFullPath(f string) string

func Irc_init

func Irc_init(config *Configuration) *serverData

func Is_valid_cidr

func Is_valid_cidr(cidr string) bool

func Is_valid_ip

func Is_valid_ip(ip string) bool

func RemoveLastChar

func RemoveLastChar(w string) string

func StripCidrFromIP

func StripCidrFromIP(ip string) string

Types

type Configuration

type Configuration struct {
	Server      string
	Channels    []string
	Nick        string
	Ident       string
	Name        string
	ConnectCmds []string
	// contains filtered or unexported fields
}

func ReadConf

func ReadConf(filename string) Configuration

type RetGlineData

type RetGlineData struct {
	Active           string `json:"active"`
	Mask             string `json:"mask"`
	ExpireTS         string `json:"expirets"`
	LastModTS        string `json:"lastmodts"`
	HoursUntilExpire string `json:"hoursuntilexpire"`
	Reason           string `json:"reason"`
}

type RetGlineDatas

type RetGlineDatas struct {
	RetGlineData []RetGlineData `json:"glines"`
}

Jump to

Keyboard shortcuts

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