Documentation ¶
Index ¶
- Constants
- Variables
- func CheckIncludeNTTTemplate(data string) error
- func CheckIncludePreferredAPTemplate(data string) error
- func CheckIncludeV4RouteTemplate(data string) error
- func CheckIncludeV4Template(data string) error
- func CheckIncludeV6RouteTemplate(data string) error
- func CheckIncludeV6Template(data string) error
- func GetConfig(inputConfPath string) error
- type Admin
- type AdminAuth
- type Auth
- type Config
- type ConnectionTemplate
- type Controller
- type DB
- type JPNIC
- type Log
- type MailServer
- type MailTemplate
- type MembershipTemplate
- type Radius
- type ServiceTemplate
- type Slack
- type SlackChannels
- type Stripe
- type Template
- type User
- type Web
Constants ¶
View Source
const ToMainSlackNotify = "main"
View Source
const ToPaymentLogSlackNotify = "payment_log"
View Source
const ToPaymentSlackNotify = "payment"
Variables ¶
View Source
var BaseStripeUrl = "https://dashboard.stripe.com"
View Source
var IsDebug = false
Functions ¶
func CheckIncludeNTTTemplate ¶
func CheckIncludeV4Template ¶
func CheckIncludeV6Template ¶
Types ¶
type Config ¶
type Config struct { Controller Controller `json:"controller"` Web Web `json:"web"` DB DB `json:"db"` Stripe Stripe `json:"stripe"` Mail MailServer `json:"mail"` JPNIC JPNIC `json:"jpnic"` Radius Radius `json:"radius"` Slack Slack `json:"slack"` Log Log `json:"log"` Template Template `json:"template"` }
var Conf Config
type ConnectionTemplate ¶
type ConnectionTemplate struct { Name string `json:"name"` Type string `json:"type"` Comment string `json:"comment"` NeedInternet bool `json:"need_internet"` NeedComment bool `json:"need_comment"` NeedCrossConnect bool `json:"need_cross_connect"` IsL2 bool `json:"is_l2"` IsL3 bool `json:"is_l3"` }
func GetConnectionTemplate ¶
func GetConnectionTemplate(connectionType string) (*ConnectionTemplate, error)
type Controller ¶
type MailServer ¶
type MailTemplate ¶
type MailTemplate struct { ID string `json:"id"` Title string `json:"title"` Message string `json:"message"` }
func GetMailTemplate ¶
func GetMailTemplate(id string) (*MailTemplate, error)
type MembershipTemplate ¶
type MembershipTemplate struct { Title string `json:"title"` Plan string `json:"plan"` PriceID string `json:"price_id"` Fee string `json:"fee"` }
func GetMembershipTemplate ¶
func GetMembershipTemplate(plan string) (*MembershipTemplate, error)
type ServiceTemplate ¶
type ServiceTemplate struct { Hidden bool `json:"hidden"` Name string `json:"name"` Type string `json:"type"` Comment string `json:"comment"` NeedJPNIC bool `json:"need_jpnic"` NeedGlobalAS bool `json:"need_global_as"` NeedComment bool `json:"need_comment"` NeedRoute bool `json:"need_route"` NeedBGP bool `json:"need_bgp"` }
func GetServiceTemplate ¶
func GetServiceTemplate(serviceType string) (*ServiceTemplate, error)
type Slack ¶
type Slack struct { AppToken string `json:"app_token"` BotToken string `json:"bot_token"` Channels SlackChannels `json:"channels"` }
type SlackChannels ¶
type Template ¶
type Template struct { Service []ServiceTemplate `json:"service"` Connection []ConnectionTemplate `json:"connection"` Membership []MembershipTemplate `json:"membership"` NTT []string `json:"NTT"` V4 []string `json:"v4"` V6 []string `json:"v6"` V4Route []string `json:"v4_route"` V6Route []string `json:"v6_route"` PreferredAP []string `json:"preferred_ap"` Mail []MailTemplate `json:"mail"` }
Click to show internal directories.
Click to hide internal directories.