settings

package
v0.0.0-...-0fb43f7 Latest Latest
Warning

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

Go to latest
Published: May 3, 2022 License: AGPL-3.0 Imports: 4 Imported by: 0

README

settings - work with settings 💾

Beta 0.1

Package for working with server_os settings

import to progect:
import "github.com/nik19ta/go_server/api/settings"
Funcs:

🕳

use stract Settings:
type Settings struct {
	Version string `json:"version"`
	Users   []map[string]string
}
Settings methods:
  • Swipe(button) - Simulates clicking on the slider
  • Send() return []byte, bool - returns a struct converted to Json
  • LogIn(username string, password string) return bool - checks the user's password and returns true if the password matches and false if not

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Settings

type Settings struct {
	Version string `json:"version"`
	Users   []map[string]string
}

Settings - структура настроек

func CreateSettings

func CreateSettings() Settings

func Get

func Get() Settings

Get - получение настроек

func Record

func Record(settingsJSON string) Settings

Record - записывает новые настройки

func (*Settings) LogIn

func (s *Settings) LogIn(username string, password string) bool

func (*Settings) Send

func (s *Settings) Send() ([]byte, bool)

Send - --> возвращает структуру преобразованную в Json

Jump to

Keyboard shortcuts

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