Skip to content

Commit

Permalink
fix failing linter
Browse files Browse the repository at this point in the history
Signed-off-by: nyagamunene <[email protected]>
  • Loading branch information
nyagamunene committed Dec 2, 2024
1 parent f21503f commit 2421ea4
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 91 deletions.
17 changes: 0 additions & 17 deletions api/http/requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,23 +88,6 @@ func (req ocspReq) validate() error {
return nil
}

type createCSRReq struct {
Metadata certs.CSRMetadata `json:"metadata"`
PrivateKey string `json:"private_key"`
privKey any
}

func (req createCSRReq) validate() error {
if req.Metadata.CommonName == "" {
return errors.Wrap(certs.ErrMalformedEntity, ErrMissingCN)
}

if len(req.PrivateKey) == 0 {
return errors.Wrap(certs.ErrMalformedEntity, ErrMissingPrivKey)
}
return nil
}

type IssueFromCSRReq struct {
entityID string
ttl string
Expand Down
16 changes: 0 additions & 16 deletions api/http/responses.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,22 +202,6 @@ type fileDownloadRes struct {
ContentType string
}

type createCSRRes struct {
CSR string `json:"csr"`
}

func (res createCSRRes) Code() int {
return http.StatusCreated
}

func (res createCSRRes) Headers() map[string]string {
return map[string]string{}
}

func (res createCSRRes) Empty() bool {
return false
}

type issueFromCSRRes struct {
SerialNumber string `json:"serial_number"`
Certificate string `json:"certificate,omitempty"`
Expand Down
58 changes: 0 additions & 58 deletions mocks/service.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2421ea4

Please sign in to comment.