Documentation ¶
Index ¶
- Variables
- func SqlConnect(project string, p DbParams) (database *gorm.DB, err error)
- type DBOperator
- type DbParams
- type MyDB
- type Redirection
- func (s *Redirection) GetInfoByUser(ctx context.Context, user *pb.User) (*pb.ArrayRedirectData, error)
- func (s *Redirection) GetOrgByPath(ctx context.Context, path *pb.RedirectPath) (*pb.OrgUrl, error)
- func (s *Redirection) ListUsers(ctx context.Context, empty *emptypb.Empty) (*pb.Users, error)
- func (s *Redirection) PingPongMessage(ctx context.Context, message *pb.Message) (*pb.Message, error)
- func (s *Redirection) RemoveUser(ctx context.Context, r *pb.User) (*emptypb.Empty, error)
- func (s *Redirection) SetInfo(ctx context.Context, r *pb.RedirectData) (*pb.OrgUrl, error)
- func (s *Redirection) SetUser(ctx context.Context, r *pb.User) (*pb.User, error)
- type Redirects
- type Users
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Project = os.Getenv("PROJECT")
)
View Source
var RedirectTableColumn = []string{"user", "redirect_path", "org", "host", "comment", "active", "begin_at", "end_at", "created_at", "update_at", "deleted_at"}
View Source
var RedirectTableName = "redirects"
Functions ¶
Types ¶
type DBOperator ¶
type DBOperator interface {
// contains filtered or unexported methods
}
type Redirection ¶
type Redirection struct {
DbParams
}
func New ¶
func New(dbParams DbParams) Redirection
func (*Redirection) GetInfoByUser ¶
func (s *Redirection) GetInfoByUser(ctx context.Context, user *pb.User) (*pb.ArrayRedirectData, error)
func (*Redirection) GetOrgByPath ¶
func (s *Redirection) GetOrgByPath(ctx context.Context, path *pb.RedirectPath) (*pb.OrgUrl, error)
func (*Redirection) PingPongMessage ¶
func (*Redirection) RemoveUser ¶
func (*Redirection) SetInfo ¶
func (s *Redirection) SetInfo(ctx context.Context, r *pb.RedirectData) (*pb.OrgUrl, error)
Click to show internal directories.
Click to hide internal directories.