2026-03-14 17:01:11 +07:00

25 lines
430 B
Go

package link
import (
"fmt"
"net/url"
)
type service struct {
host string
}
func NewLinkService(host string) ILinkService {
return &service{
host: host,
}
}
func (s *service) GetTeamClientLink(name string, password string) string {
return fmt.Sprintf("%s?name=%s&password=%s", s.host, url.PathEscape(name), password)
}
func (s *service) GetImageLink(name string) string {
return fmt.Sprintf("%s/%s", s.host, name)
}