Skip to content

Commit f3a9311

Browse files
authored
add comments to exported functions (#92)
1 parent 44d8e9b commit f3a9311

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

restapi/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ func (c mcS3Client) removeNotificationConfig(arn string, event string, prefix st
110110
return c.client.RemoveNotificationConfig(arn, event, prefix, suffix)
111111
}
112112

113-
// Define MCSCredentials interface with all functions to be implemented
113+
// MCSCredentials interface with all functions to be implemented
114114
// by mock when testing, it should include all needed minioCredentials.Credentials api calls
115115
// that are used within this project.
116116
type MCSCredentials interface {

restapi/config.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,19 @@ import (
2424
"github.com/minio/minio/pkg/env"
2525
)
2626

27+
// Port mcs default port
2728
var Port = "9090"
29+
30+
// Hostname mcs hostname
2831
var Hostname = "localhost"
32+
33+
// TLSHostname mcs tls hostname
2934
var TLSHostname = "localhost"
35+
36+
// TLSPort mcs tls port
3037
var TLSPort = "9443"
38+
39+
// TLSRedirect mcs tls redirect rule
3140
var TLSRedirect = "off"
3241

3342
func getAccessKey() string {
@@ -70,10 +79,14 @@ func getProductionMode() bool {
7079
return strings.ToLower(env.Get(McsProductionMode, "on")) == "on"
7180
}
7281

82+
// GetHostname gets mcs hostname set on env variable,
83+
// default one or defined on run command
7384
func GetHostname() string {
7485
return strings.ToLower(env.Get(McsHostname, Hostname))
7586
}
7687

88+
// GetPort gets mcs por set on env variable
89+
// or default one
7790
func GetPort() int {
7891
port, err := strconv.Atoi(env.Get(McsPort, Port))
7992
if err != nil {
@@ -82,10 +95,14 @@ func GetPort() int {
8295
return port
8396
}
8497

98+
// GetSSLHostname gets mcs ssl hostname set on env variable
99+
// or default one
85100
func GetSSLHostname() string {
86101
return strings.ToLower(env.Get(McsTLSHostname, TLSHostname))
87102
}
88103

104+
// GetSSLPort gets mcs ssl port set on env variable
105+
// or default one
89106
func GetSSLPort() int {
90107
port, err := strconv.Atoi(env.Get(McsTLSPort, TLSPort))
91108
if err != nil {

0 commit comments

Comments
 (0)