Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PDF ¶
type PDF struct { Customer string Date time.Time PDFData io.ReadCloser }
PDF is contains all metainformation to upload a PDF to S3.
type PDFUploader ¶
type PDFUploader struct {
// contains filtered or unexported fields
}
PDFUploader uploads pdfs to the configured S3 endpoint.
func NewPDFUploader ¶
func NewPDFUploader(ctx context.Context, endpoint, bucket, keyID, secretKey string) (PDFUploader, error)
NewPDFUploader initializes an S3 client.
type SLARenderer ¶
type SLARenderer struct { Customer string ExceptionLink string Month time.Month Year int SI []ServiceInstance }
func (*SLARenderer) GeneratePDF ¶
func (s *SLARenderer) GeneratePDF() (io.ReadCloser, error)
GeneratePDF sends a request to docgen an returns the rendered PDF.
func (*SLARenderer) PrepareJSONPayload ¶
func (s *SLARenderer) PrepareJSONPayload() ([]byte, error)
PrepareJSONPayload creates a json payload that is ready to be used for docgen api endpoint https://docgen.vshn.net/api/pdf
func (*SLARenderer) RenderAsciidoc ¶
func (s *SLARenderer) RenderAsciidoc() (string, error)
RenderAsciidoc renders the sla go template into an asciidoc template
Click to show internal directories.
Click to hide internal directories.