Skip to content

Commit

Permalink
add service.go
Browse files Browse the repository at this point in the history
  • Loading branch information
ayoubfaouzi committed Jun 14, 2024
1 parent 933eb20 commit 08625c6
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions internal/webapi/service.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright 2018 Saferwall. All rights reserved.
// Use of this source code is governed by Apache v2 license
// license that can be found in the LICENSE file.

package webapi

const (
authEndpoint = "/v1/auth/login/"
usersEndpoint = "/v1/users/"
filesEndpoint = "/v1/files/"
)

type Service struct {
filesURL string
authURL string
usersURL string
}

// New generates new web apis service object.
func New(baseURL string) Service {
s := Service{}
s.authURL = baseURL + authEndpoint
s.usersURL = baseURL + usersEndpoint
s.filesURL = baseURL + filesEndpoint
return s
}

0 comments on commit 08625c6

Please sign in to comment.