selfcheck

package module
v0.0.0-...-910aeb5 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2020 License: MIT Imports: 10 Imported by: 2

README

Auto Selfcheck

설치

go get github.com/gangjun06/auto-selfcheck

사용법

go Document

// 학교 검색하기
orgCode, err := selfcheck.FindSchool("학교이름", Area, Level)
if err != nil{
    log.Fatal(err)
}

// 학생 정보 가져오기
info, err := selfcheck.GetStudentInfo(Area, orgCode, "이름", "생일(주민등록번호 앞자리)")
if err != nil{
    log.Fatal(err)
}

// 모두 건강함으로 참여하기
if err := info.AllHealthy(); err != nil {
    log.Fatal(err)
}

Area Type

AREA_SEOUL
AREA_BUSAN
AREA_DAEGU
AREA_INCHEON
AREA_GWANGJU
AREA_DAEJEON
AREA_ULSAN
AREA_SEJONG
AREA_GYEONGGI
AREA_GANGWON
AREA_CHUNGBUK
AREA_CHUNGNAM
AREA_JEONBUK
AREA_JEONNAM
AREA_GYEONGBUK
AREA_GYEONGNAM
AREA_JEJ

Level Type

LEVEL_KIDER
LEVEL_ELEMENTRY
LEVEL_MIDDLE
LEVEL_HIGH
LEVEL_SPECIAL
)

License

Mit License

Documentation

Index

Constants

View Source
const (
	AREA_SEOUL = 1 + iota
	AREA_BUSAN
	AREA_DAEGU
	AREA_INCHEON
	AREA_GWANGJU
	AREA_DAEJEON
	AREA_ULSAN
	AREA_SEJONG
	AREA_GYEONGGI
	AREA_GANGWON
	AREA_CHUNGBUK
	AREA_CHUNGNAM
	AREA_JEONBUK
	AREA_JEONNAM
	AREA_GYEONGBUK
	AREA_GYEONGNAM
	AREA_JEJ
)
View Source
const (
	LEVEL_KIDER = 1 + iota
	LEVEL_ELEMENTRY
	LEVEL_MIDDLE
	LEVEL_HIGH
	LEVEL_SPECIAL
)

Variables

View Source
var (
	ErrInfoNotFound = errors.New("Cannot Find Data")
)

Functions

func Encrypt

func Encrypt(text string) *string

Encrypt For SignIn

func FindSchool

func FindSchool(name string, area Area, level Level) (string, error)

FindSchool get school orgCode

func GetAreaCode

func GetAreaCode(area Area) int

GetAreaCode from area code

func GetAreaURL

func GetAreaURL(area Area) string

GetAreaURL for reqest to hcs.eduro.go.kr

Types

type Area

type Area int

type Level

type Level int

type StudentInfo

type StudentInfo struct {
	SchoolName string `json:"orgname"`
	Name       string `json:"userName"`
	Token      string `json:"token"`
	Birth      string
	AreaURL    string
}

func GetStudnetInfo

func GetStudnetInfo(area Area, orgCode, name, birth string) (*StudentInfo, error)

GetStudentInfo get student info struct

func (*StudentInfo) AllHealthy

func (s *StudentInfo) AllHealthy() error

AllHealthy Send Servey all healthy

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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