model

package
v0.0.0-...-3241eb1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2019 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Overview

@File: config.go @Contact: lucien@lucien.ink @Licence: (C)Copyright 2019 Lucien Shui

@Modify Time @Author @Version @Description ------------ ------- -------- ----------- 2019-07-25 01:33 Lucien 1.0 Init

@File: history.go @Contact: lucien@lucien.ink @Licence: (C)Copyright 2019 Lucien Shui

@Modify Time @Author @Version @Description ------------ ------- -------- ----------- 2019-07-25 01:33 Lucien 1.0 Init

@File: model.go @Contact: lucien@lucien.ink @Licence: (C)Copyright 2019 Lucien Shui

@Modify Time @Author @Version @Description ------------ ------- -------- ----------- 2019-07-25 01:39 Lucien 1.0 Init

@File: model.go @Contact: lucien@lucien.ink @Licence: (C)Copyright 2019 Lucien

@Modify Time @Author @Version @Description ------------ ------- -------- ----------- 2019-07-24 23:29 Lucien 1.0 Init

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Address  string    `json:"address"`
	Port     uint16    `json:"port"`
	Webhooks []Webhook `json:"webhooks"`
}

func (*Config) Get

func (config *Config) Get(name string) (Webhook, error)

func (*Config) Load

func (config *Config) Load(filename string)

type History

type History struct {
	Name      string `gorm:"primary_key;type:varchar(32)"`
	Content   string `gorm:"type:mediumtext"`
	UpdatedAt time.Time
}

func (*History) Load

func (object *History) Load() error

func (History) Save

func (object History) Save() error

type Webhook

type Webhook struct {
	Name     string ` json:"name"`
	Script   string `json:"script"`
	Password string `json:"password"`
}

Jump to

Keyboard shortcuts

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