server

package
v1.1.17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTargetTargetsPath

func CreateTargetTargetsPath() string

CreateTargetTargetsPath returns the URL path to the targets service Create target HTTP endpoint.

func DecodeCreateTargetRequest

func DecodeCreateTargetRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (any, error)

DecodeCreateTargetRequest returns a decoder for requests sent to the targets Create target endpoint.

func DecodeDeleteTargetTeamRequest added in v1.1.0

func DecodeDeleteTargetTeamRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (any, error)

DecodeDeleteTargetTeamRequest returns a decoder for requests sent to the targets Delete target team endpoint.

func DecodeDeleteTeamRequest added in v1.1.0

func DecodeDeleteTeamRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (any, error)

DecodeDeleteTeamRequest returns a decoder for requests sent to the targets Delete team endpoint.

func DecodeGetFindingByTargetIssueAndAffectedResourceRequest

func DecodeGetFindingByTargetIssueAndAffectedResourceRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (any, error)

DecodeGetFindingByTargetIssueAndAffectedResourceRequest returns a decoder for requests sent to the targets Get finding by target, issue and affected resource endpoint.

func DecodeGetTargetMTTRRequest

func DecodeGetTargetMTTRRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (any, error)

DecodeGetTargetMTTRRequest returns a decoder for requests sent to the targets Get target MTTR endpoint.

func DecodeGetTargetRequest

func DecodeGetTargetRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (any, error)

DecodeGetTargetRequest returns a decoder for requests sent to the targets Get target endpoint.

func DecodeListFindingsByTargetRequest

func DecodeListFindingsByTargetRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (any, error)

DecodeListFindingsByTargetRequest returns a decoder for requests sent to the targets List findings by target endpoint.

func DecodeListTargetsRequest

func DecodeListTargetsRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (any, error)

DecodeListTargetsRequest returns a decoder for requests sent to the targets List targets endpoint.

func DecodeTargetsSummaryRequest

func DecodeTargetsSummaryRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (any, error)

DecodeTargetsSummaryRequest returns a decoder for requests sent to the targets Targets summary endpoint.

func DeleteTargetTeamTargetsPath added in v1.1.0

func DeleteTargetTeamTargetsPath(targetID string, team string) string

DeleteTargetTeamTargetsPath returns the URL path to the targets service Delete target team HTTP endpoint.

func DeleteTeamTargetsPath added in v1.1.0

func DeleteTeamTargetsPath(team string) string

DeleteTeamTargetsPath returns the URL path to the targets service Delete team HTTP endpoint.

func EncodeCreateTargetResponse

func EncodeCreateTargetResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error

EncodeCreateTargetResponse returns an encoder for responses returned by the targets Create target endpoint.

func EncodeDeleteTargetTeamResponse added in v1.1.0

func EncodeDeleteTargetTeamResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error

EncodeDeleteTargetTeamResponse returns an encoder for responses returned by the targets Delete target team endpoint.

func EncodeDeleteTeamResponse added in v1.1.0

func EncodeDeleteTeamResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error

EncodeDeleteTeamResponse returns an encoder for responses returned by the targets Delete team endpoint.

func EncodeGetFindingByTargetIssueAndAffectedResourceResponse

func EncodeGetFindingByTargetIssueAndAffectedResourceResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error

EncodeGetFindingByTargetIssueAndAffectedResourceResponse returns an encoder for responses returned by the targets Get finding by target, issue and affected resource endpoint.

func EncodeGetTargetMTTRResponse

func EncodeGetTargetMTTRResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error

EncodeGetTargetMTTRResponse returns an encoder for responses returned by the targets Get target MTTR endpoint.

func EncodeGetTargetResponse

func EncodeGetTargetResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error

EncodeGetTargetResponse returns an encoder for responses returned by the targets Get target endpoint.

func EncodeListFindingsByTargetResponse

func EncodeListFindingsByTargetResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error

EncodeListFindingsByTargetResponse returns an encoder for responses returned by the targets List findings by target endpoint.

func EncodeListTargetsResponse

func EncodeListTargetsResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error

EncodeListTargetsResponse returns an encoder for responses returned by the targets List targets endpoint.

func EncodeTargetsSummaryResponse

func EncodeTargetsSummaryResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error

EncodeTargetsSummaryResponse returns an encoder for responses returned by the targets Targets summary endpoint.

func GetFindingByTargetIssueAndAffectedResourceTargetsPath

func GetFindingByTargetIssueAndAffectedResourceTargetsPath(targetID string, issueID string, resource string) string

GetFindingByTargetIssueAndAffectedResourceTargetsPath returns the URL path to the targets service Get finding by target, issue and affected resource HTTP endpoint.

func GetTargetMTTRTargetsPath

func GetTargetMTTRTargetsPath(id string) string

GetTargetMTTRTargetsPath returns the URL path to the targets service Get target MTTR HTTP endpoint.

func GetTargetTargetsPath

func GetTargetTargetsPath(id string) string

GetTargetTargetsPath returns the URL path to the targets service Get target HTTP endpoint.

func ListFindingsByTargetTargetsPath

func ListFindingsByTargetTargetsPath(id string) string

ListFindingsByTargetTargetsPath returns the URL path to the targets service List findings by target HTTP endpoint.

func ListTargetsTargetsPath

func ListTargetsTargetsPath() string

ListTargetsTargetsPath returns the URL path to the targets service List targets HTTP endpoint.

func Mount

func Mount(mux goahttp.Muxer, h *Server)

Mount configures the mux to serve the targets endpoints.

func MountCreateTargetHandler

func MountCreateTargetHandler(mux goahttp.Muxer, h http.Handler)

MountCreateTargetHandler configures the mux to serve the "targets" service "Create target" endpoint.

func MountDeleteTargetTeamHandler added in v1.1.0

func MountDeleteTargetTeamHandler(mux goahttp.Muxer, h http.Handler)

MountDeleteTargetTeamHandler configures the mux to serve the "targets" service "Delete target team" endpoint.

func MountDeleteTeamHandler added in v1.1.0

func MountDeleteTeamHandler(mux goahttp.Muxer, h http.Handler)

MountDeleteTeamHandler configures the mux to serve the "targets" service "Delete team" endpoint.

func MountGetFindingByTargetIssueAndAffectedResourceHandler

func MountGetFindingByTargetIssueAndAffectedResourceHandler(mux goahttp.Muxer, h http.Handler)

MountGetFindingByTargetIssueAndAffectedResourceHandler configures the mux to serve the "targets" service "Get finding by target, issue and affected resource" endpoint.

func MountGetTargetHandler

func MountGetTargetHandler(mux goahttp.Muxer, h http.Handler)

MountGetTargetHandler configures the mux to serve the "targets" service "Get target" endpoint.

func MountGetTargetMTTRHandler

func MountGetTargetMTTRHandler(mux goahttp.Muxer, h http.Handler)

MountGetTargetMTTRHandler configures the mux to serve the "targets" service "Get target MTTR" endpoint.

func MountListFindingsByTargetHandler

func MountListFindingsByTargetHandler(mux goahttp.Muxer, h http.Handler)

MountListFindingsByTargetHandler configures the mux to serve the "targets" service "List findings by target" endpoint.

func MountListTargetsHandler

func MountListTargetsHandler(mux goahttp.Muxer, h http.Handler)

MountListTargetsHandler configures the mux to serve the "targets" service "List targets" endpoint.

func MountTargetsSummaryHandler

func MountTargetsSummaryHandler(mux goahttp.Muxer, h http.Handler)

MountTargetsSummaryHandler configures the mux to serve the "targets" service "Targets summary" endpoint.

func NewCreateTargetHandler

func NewCreateTargetHandler(
	endpoint goa.Endpoint,
	mux goahttp.Muxer,
	decoder func(*http.Request) goahttp.Decoder,
	encoder func(context.Context, http.ResponseWriter) goahttp.Encoder,
	errhandler func(context.Context, http.ResponseWriter, error),
	formatter func(ctx context.Context, err error) goahttp.Statuser,
) http.Handler

NewCreateTargetHandler creates a HTTP handler which loads the HTTP request and calls the "targets" service "Create target" endpoint.

func NewCreateTargetPayload

func NewCreateTargetPayload(body *CreateTargetRequestBody) *targets.CreateTargetPayload

NewCreateTargetPayload builds a targets service Create target endpoint payload.

func NewDeleteTargetTeamHandler added in v1.1.0

func NewDeleteTargetTeamHandler(
	endpoint goa.Endpoint,
	mux goahttp.Muxer,
	decoder func(*http.Request) goahttp.Decoder,
	encoder func(context.Context, http.ResponseWriter) goahttp.Encoder,
	errhandler func(context.Context, http.ResponseWriter, error),
	formatter func(ctx context.Context, err error) goahttp.Statuser,
) http.Handler

NewDeleteTargetTeamHandler creates a HTTP handler which loads the HTTP request and calls the "targets" service "Delete target team" endpoint.

func NewDeleteTargetTeamPayload added in v1.1.0

func NewDeleteTargetTeamPayload(targetID string, team string, auth string) *targets.DeleteTargetTeamPayload

NewDeleteTargetTeamPayload builds a targets service Delete target team endpoint payload.

func NewDeleteTeamHandler added in v1.1.0

func NewDeleteTeamHandler(
	endpoint goa.Endpoint,
	mux goahttp.Muxer,
	decoder func(*http.Request) goahttp.Decoder,
	encoder func(context.Context, http.ResponseWriter) goahttp.Encoder,
	errhandler func(context.Context, http.ResponseWriter, error),
	formatter func(ctx context.Context, err error) goahttp.Statuser,
) http.Handler

NewDeleteTeamHandler creates a HTTP handler which loads the HTTP request and calls the "targets" service "Delete team" endpoint.

func NewDeleteTeamPayload added in v1.1.0

func NewDeleteTeamPayload(team string, auth string) *targets.DeleteTeamPayload

NewDeleteTeamPayload builds a targets service Delete team endpoint payload.

func NewGetFindingByTargetIssueAndAffectedResourceHandler

func NewGetFindingByTargetIssueAndAffectedResourceHandler(
	endpoint goa.Endpoint,
	mux goahttp.Muxer,
	decoder func(*http.Request) goahttp.Decoder,
	encoder func(context.Context, http.ResponseWriter) goahttp.Encoder,
	errhandler func(context.Context, http.ResponseWriter, error),
	formatter func(ctx context.Context, err error) goahttp.Statuser,
) http.Handler

NewGetFindingByTargetIssueAndAffectedResourceHandler creates a HTTP handler which loads the HTTP request and calls the "targets" service "Get finding by target, issue and affected resource" endpoint.

func NewGetFindingByTargetIssueAndAffectedResourcePayload

func NewGetFindingByTargetIssueAndAffectedResourcePayload(targetID string, issueID string, resource string) *targets.GetFindingByTargetIssueAndAffectedResourcePayload

NewGetFindingByTargetIssueAndAffectedResourcePayload builds a targets service Get finding by target, issue and affected resource endpoint payload.

func NewGetTargetHandler

func NewGetTargetHandler(
	endpoint goa.Endpoint,
	mux goahttp.Muxer,
	decoder func(*http.Request) goahttp.Decoder,
	encoder func(context.Context, http.ResponseWriter) goahttp.Encoder,
	errhandler func(context.Context, http.ResponseWriter, error),
	formatter func(ctx context.Context, err error) goahttp.Statuser,
) http.Handler

NewGetTargetHandler creates a HTTP handler which loads the HTTP request and calls the "targets" service "Get target" endpoint.

func NewGetTargetMTTRHandler

func NewGetTargetMTTRHandler(
	endpoint goa.Endpoint,
	mux goahttp.Muxer,
	decoder func(*http.Request) goahttp.Decoder,
	encoder func(context.Context, http.ResponseWriter) goahttp.Encoder,
	errhandler func(context.Context, http.ResponseWriter, error),
	formatter func(ctx context.Context, err error) goahttp.Statuser,
) http.Handler

NewGetTargetMTTRHandler creates a HTTP handler which loads the HTTP request and calls the "targets" service "Get target MTTR" endpoint.

func NewGetTargetMTTRPayload

func NewGetTargetMTTRPayload(id string) *targets.GetTargetMTTRPayload

NewGetTargetMTTRPayload builds a targets service Get target MTTR endpoint payload.

func NewGetTargetPayload

func NewGetTargetPayload(id string) *targets.GetTargetPayload

NewGetTargetPayload builds a targets service Get target endpoint payload.

func NewListFindingsByTargetHandler

func NewListFindingsByTargetHandler(
	endpoint goa.Endpoint,
	mux goahttp.Muxer,
	decoder func(*http.Request) goahttp.Decoder,
	encoder func(context.Context, http.ResponseWriter) goahttp.Encoder,
	errhandler func(context.Context, http.ResponseWriter, error),
	formatter func(ctx context.Context, err error) goahttp.Statuser,
) http.Handler

NewListFindingsByTargetHandler creates a HTTP handler which loads the HTTP request and calls the "targets" service "List findings by target" endpoint.

func NewListFindingsByTargetPayload

func NewListFindingsByTargetPayload(id string, status *string, sortBy *string, page *int, size *int, labels *string) *targets.ListFindingsByTargetPayload

NewListFindingsByTargetPayload builds a targets service List findings by target endpoint payload.

func NewListTargetsHandler

func NewListTargetsHandler(
	endpoint goa.Endpoint,
	mux goahttp.Muxer,
	decoder func(*http.Request) goahttp.Decoder,
	encoder func(context.Context, http.ResponseWriter) goahttp.Encoder,
	errhandler func(context.Context, http.ResponseWriter, error),
	formatter func(ctx context.Context, err error) goahttp.Statuser,
) http.Handler

NewListTargetsHandler creates a HTTP handler which loads the HTTP request and calls the "targets" service "List targets" endpoint.

func NewListTargetsPayload

func NewListTargetsPayload(team *string, teams *string, identifier *string, page *int, size *int, identifiermatch *bool, identifiers *string) *targets.ListTargetsPayload

NewListTargetsPayload builds a targets service List targets endpoint payload.

func NewTargetsSummaryHandler

func NewTargetsSummaryHandler(
	endpoint goa.Endpoint,
	mux goahttp.Muxer,
	decoder func(*http.Request) goahttp.Decoder,
	encoder func(context.Context, http.ResponseWriter) goahttp.Encoder,
	errhandler func(context.Context, http.ResponseWriter, error),
	formatter func(ctx context.Context, err error) goahttp.Statuser,
) http.Handler

NewTargetsSummaryHandler creates a HTTP handler which loads the HTTP request and calls the "targets" service "Targets summary" endpoint.

func NewTargetsSummaryPayload

func NewTargetsSummaryPayload(team *string, teams *string, status *string, sortBy *string, page *int, size *int, identifiers *string, labels *string) *targets.TargetsSummaryPayload

NewTargetsSummaryPayload builds a targets service Targets summary endpoint payload.

func TargetsSummaryTargetsPath

func TargetsSummaryTargetsPath() string

TargetsSummaryTargetsPath returns the URL path to the targets service Targets summary HTTP endpoint.

Types

type CreateTargetRequestBody

type CreateTargetRequestBody struct {
	// Target Identifier
	Identifier *string `form:"identifier,omitempty" json:"identifier,omitempty" xml:"identifier,omitempty"`
	// Target Teams
	Teams []string `form:"teams,omitempty" json:"teams,omitempty" xml:"teams,omitempty"`
}

CreateTargetRequestBody is the type of the "targets" service "Create target" endpoint HTTP request body.

type CreateTargetResponseBody

type CreateTargetResponseBody struct {
	// Target ID
	ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Target identifier
	Identifier *string `form:"identifier,omitempty" json:"identifier,omitempty" xml:"identifier,omitempty"`
	// List of teams associated with target
	Teams []string `form:"teams,omitempty" json:"teams,omitempty" xml:"teams,omitempty"`
}

CreateTargetResponseBody is the type of the "targets" service "Create target" endpoint HTTP response body.

func NewCreateTargetResponseBody

func NewCreateTargetResponseBody(res *targetsviews.TargetView) *CreateTargetResponseBody

NewCreateTargetResponseBody builds the HTTP response body from the result of the "Create target" endpoint of the "targets" service.

type FindingResponse

type FindingResponse struct {
	// Finding ID
	ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Issue
	Issue *IssueResponse `form:"issue,omitempty" json:"issue,omitempty" xml:"issue,omitempty"`
	// Target
	Target *TargetResponse `form:"target,omitempty" json:"target,omitempty" xml:"target,omitempty"`
	// Source
	Source *SourcewithnotargetResponse `form:"source,omitempty" json:"source,omitempty" xml:"source,omitempty"`
	// Finding details
	Details *string `form:"details,omitempty" json:"details,omitempty" xml:"details,omitempty"`
	// Finding impact details
	ImpactDetails *string `form:"impact_details,omitempty" json:"impact_details,omitempty" xml:"impact_details,omitempty"`
	// Finding status. Can be 'OPEN' or 'FIXED'.
	Status *string `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"`
	// Finding severity score
	Score *float32 `form:"score,omitempty" json:"score,omitempty" xml:"score,omitempty"`
	// Other resources associated with the finding
	Resources []*ResourceGroupResponse `form:"resources,omitempty" json:"resources,omitempty" xml:"resources,omitempty"`
}

FindingResponse is used to define fields on response body types.

type FindingResponseCollection

type FindingResponseCollection []*FindingResponse

FindingResponseCollection is the type of the "targets" service "List findings by target" endpoint HTTP response body.

func NewFindingResponseCollection

func NewFindingResponseCollection(res targetsviews.FindingCollectionView) FindingResponseCollection

NewFindingResponseCollection builds the HTTP response body from the result of the "List findings by target" endpoint of the "targets" service.

type GetFindingByTargetIssueAndAffectedResourceResponseBody

type GetFindingByTargetIssueAndAffectedResourceResponseBody struct {
	// Finding ID
	ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Issue
	Issue *IssueResponseBody `form:"issue,omitempty" json:"issue,omitempty" xml:"issue,omitempty"`
	// Target
	Target *TargetResponseBody `form:"target,omitempty" json:"target,omitempty" xml:"target,omitempty"`
	// Source
	Source *SourcewithnotargetResponseBody `form:"source,omitempty" json:"source,omitempty" xml:"source,omitempty"`
	// Finding details
	Details *string `form:"details,omitempty" json:"details,omitempty" xml:"details,omitempty"`
	// Finding impact details
	ImpactDetails *string `form:"impact_details,omitempty" json:"impact_details,omitempty" xml:"impact_details,omitempty"`
	// Finding status. Can be 'OPEN' or 'FIXED'.
	Status *string `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"`
	// Finding severity score
	Score *float32 `form:"score,omitempty" json:"score,omitempty" xml:"score,omitempty"`
	// Other resources associated with the finding
	Resources []*ResourceGroupResponseBody `form:"resources,omitempty" json:"resources,omitempty" xml:"resources,omitempty"`
}

GetFindingByTargetIssueAndAffectedResourceResponseBody is the type of the "targets" service "Get finding by target, issue and affected resource" endpoint HTTP response body.

func NewGetFindingByTargetIssueAndAffectedResourceResponseBody

func NewGetFindingByTargetIssueAndAffectedResourceResponseBody(res *targetsviews.FindingView) *GetFindingByTargetIssueAndAffectedResourceResponseBody

NewGetFindingByTargetIssueAndAffectedResourceResponseBody builds the HTTP response body from the result of the "Get finding by target, issue and affected resource" endpoint of the "targets" service.

type GetTargetResponseBody

type GetTargetResponseBody struct {
	// Target ID
	ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Target identifier
	Identifier *string `form:"identifier,omitempty" json:"identifier,omitempty" xml:"identifier,omitempty"`
	// List of teams associated with target
	Teams []string `form:"teams,omitempty" json:"teams,omitempty" xml:"teams,omitempty"`
}

GetTargetResponseBody is the type of the "targets" service "Get target" endpoint HTTP response body.

func NewGetTargetResponseBody

func NewGetTargetResponseBody(res *targetsviews.TargetView) *GetTargetResponseBody

NewGetTargetResponseBody builds the HTTP response body from the result of the "Get target" endpoint of the "targets" service.

type IssueResponse

type IssueResponse struct {
	// Issue ID
	ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Issue summary
	Summary *string `form:"summary,omitempty" json:"summary,omitempty" xml:"summary,omitempty"`
	// Common Weakness Enumeration ID
	CweID *int `form:"cwe_id,omitempty" json:"cwe_id,omitempty" xml:"cwe_id,omitempty"`
	// Issue description
	Description *string `form:"description,omitempty" json:"description,omitempty" xml:"description,omitempty"`
	// Recommendations to fix the issue
	Recommendations []string `form:"recommendations,omitempty" json:"recommendations,omitempty" xml:"recommendations,omitempty"`
	// Documentation reference for the issue
	ReferenceLinks []string `form:"reference_links,omitempty" json:"reference_links,omitempty" xml:"reference_links,omitempty"`
	// Labels associated with the issue
	Labels []string `form:"labels,omitempty" json:"labels,omitempty" xml:"labels,omitempty"`
}

IssueResponse is used to define fields on response body types.

type IssueResponseBody

type IssueResponseBody struct {
	// Issue ID
	ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Issue summary
	Summary *string `form:"summary,omitempty" json:"summary,omitempty" xml:"summary,omitempty"`
	// Common Weakness Enumeration ID
	CweID *int `form:"cwe_id,omitempty" json:"cwe_id,omitempty" xml:"cwe_id,omitempty"`
	// Issue description
	Description *string `form:"description,omitempty" json:"description,omitempty" xml:"description,omitempty"`
	// Recommendations to fix the issue
	Recommendations []string `form:"recommendations,omitempty" json:"recommendations,omitempty" xml:"recommendations,omitempty"`
	// Documentation reference for the issue
	ReferenceLinks []string `form:"reference_links,omitempty" json:"reference_links,omitempty" xml:"reference_links,omitempty"`
	// Labels associated with the issue
	Labels []string `form:"labels,omitempty" json:"labels,omitempty" xml:"labels,omitempty"`
}

IssueResponseBody is used to define fields on response body types.

type MountPoint

type MountPoint struct {
	// Method is the name of the service method served by the mounted HTTP handler.
	Method string
	// Verb is the HTTP method used to match requests to the mounted handler.
	Verb string
	// Pattern is the HTTP request path pattern used to match requests to the
	// mounted handler.
	Pattern string
}

MountPoint holds information about the mounted endpoints.

type ResourceGroupResponse

type ResourceGroupResponse struct {
	// Name of the resource group
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// Column names of the resource group in the order that should be rendered
	Attributes []string `form:"attributes,omitempty" json:"attributes,omitempty" xml:"attributes,omitempty"`
	// List containing the resource rows as hashmap
	Resources []map[string]string `form:"resources,omitempty" json:"resources,omitempty" xml:"resources,omitempty"`
}

ResourceGroupResponse is used to define fields on response body types.

type ResourceGroupResponseBody

type ResourceGroupResponseBody struct {
	// Name of the resource group
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// Column names of the resource group in the order that should be rendered
	Attributes []string `form:"attributes,omitempty" json:"attributes,omitempty" xml:"attributes,omitempty"`
	// List containing the resource rows as hashmap
	Resources []map[string]string `form:"resources,omitempty" json:"resources,omitempty" xml:"resources,omitempty"`
}

ResourceGroupResponseBody is used to define fields on response body types.

type Server

type Server struct {
	Mounts                                     []*MountPoint
	ListTargets                                http.Handler
	TargetsSummary                             http.Handler
	GetTarget                                  http.Handler
	CreateTarget                               http.Handler
	ListFindingsByTarget                       http.Handler
	GetFindingByTargetIssueAndAffectedResource http.Handler
	GetTargetMTTR                              http.Handler
	DeleteTargetTeam                           http.Handler
	DeleteTeam                                 http.Handler
}

Server lists the targets service endpoint HTTP handlers.

func New

func New(
	e *targets.Endpoints,
	mux goahttp.Muxer,
	decoder func(*http.Request) goahttp.Decoder,
	encoder func(context.Context, http.ResponseWriter) goahttp.Encoder,
	errhandler func(context.Context, http.ResponseWriter, error),
	formatter func(ctx context.Context, err error) goahttp.Statuser,
) *Server

New instantiates HTTP handlers for all the targets service endpoints using the provided encoder and decoder. The handlers are mounted on the given mux using the HTTP verb and path defined in the design. errhandler is called whenever a response fails to be encoded. formatter is used to format errors returned by the service methods prior to encoding. Both errhandler and formatter are optional and can be nil.

func (*Server) MethodNames added in v1.1.14

func (s *Server) MethodNames() []string

MethodNames returns the methods served.

func (*Server) Mount added in v1.1.14

func (s *Server) Mount(mux goahttp.Muxer)

Mount configures the mux to serve the targets endpoints.

func (*Server) Service

func (s *Server) Service() string

Service returns the name of the service served.

func (*Server) Use

func (s *Server) Use(m func(http.Handler) http.Handler)

Use wraps the server handlers with the given middleware.

type SourcewithnotargetResponse

type SourcewithnotargetResponse struct {
	// Source ID
	ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Source name
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// Source component
	Component *string `form:"component,omitempty" json:"component,omitempty" xml:"component,omitempty"`
	// Source instance
	Instance *string `form:"instance,omitempty" json:"instance,omitempty" xml:"instance,omitempty"`
	// Source options
	Options *string `form:"options,omitempty" json:"options,omitempty" xml:"options,omitempty"`
	// Time on which the source scanned the target
	Time *string `form:"time,omitempty" json:"time,omitempty" xml:"time,omitempty"`
}

SourcewithnotargetResponse is used to define fields on response body types.

type SourcewithnotargetResponseBody

type SourcewithnotargetResponseBody struct {
	// Source ID
	ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Source name
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// Source component
	Component *string `form:"component,omitempty" json:"component,omitempty" xml:"component,omitempty"`
	// Source instance
	Instance *string `form:"instance,omitempty" json:"instance,omitempty" xml:"instance,omitempty"`
	// Source options
	Options *string `form:"options,omitempty" json:"options,omitempty" xml:"options,omitempty"`
	// Time on which the source scanned the target
	Time *string `form:"time,omitempty" json:"time,omitempty" xml:"time,omitempty"`
}

SourcewithnotargetResponseBody is used to define fields on response body types.

type TargetResponse

type TargetResponse struct {
	// Target ID
	ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Target identifier
	Identifier *string `form:"identifier,omitempty" json:"identifier,omitempty" xml:"identifier,omitempty"`
	// List of teams associated with target
	Teams []string `form:"teams,omitempty" json:"teams,omitempty" xml:"teams,omitempty"`
}

TargetResponse is used to define fields on response body types.

type TargetResponseBody

type TargetResponseBody struct {
	// Target ID
	ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Target identifier
	Identifier *string `form:"identifier,omitempty" json:"identifier,omitempty" xml:"identifier,omitempty"`
	// List of teams associated with target
	Teams []string `form:"teams,omitempty" json:"teams,omitempty" xml:"teams,omitempty"`
}

TargetResponseBody is used to define fields on response body types.

type TargetResponseCollection

type TargetResponseCollection []*TargetResponse

TargetResponseCollection is the type of the "targets" service "List targets" endpoint HTTP response body.

func NewTargetResponseCollection

func NewTargetResponseCollection(res targetsviews.TargetCollectionView) TargetResponseCollection

NewTargetResponseCollection builds the HTTP response body from the result of the "List targets" endpoint of the "targets" service.

type TargetSummaryResponse

type TargetSummaryResponse struct {
	// Target ID
	TargetID *string `form:"target_id,omitempty" json:"target_id,omitempty" xml:"target_id,omitempty"`
	// Target identifier
	Identifier *string `form:"identifier,omitempty" json:"identifier,omitempty" xml:"identifier,omitempty"`
	// Number of findings for target
	FindingsCount *int `form:"findings_count,omitempty" json:"findings_count,omitempty" xml:"findings_count,omitempty"`
	// Number of issues for target
	IssuesCount *int `form:"issues_count,omitempty" json:"issues_count,omitempty" xml:"issues_count,omitempty"`
	// Max score for target
	MaxScore *float32 `form:"max_score,omitempty" json:"max_score,omitempty" xml:"max_score,omitempty"`
}

TargetSummaryResponse is used to define fields on response body types.

type TargetSummaryResponseCollection

type TargetSummaryResponseCollection []*TargetSummaryResponse

TargetSummaryResponseCollection is the type of the "targets" service "Targets summary" endpoint HTTP response body.

func NewTargetSummaryResponseCollection

func NewTargetSummaryResponseCollection(res targetsviews.TargetSummaryCollectionView) TargetSummaryResponseCollection

NewTargetSummaryResponseCollection builds the HTTP response body from the result of the "Targets summary" endpoint of the "targets" service.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL