// Show runs the show action.
543526
func (c *SpaceTemplateController) Show(ctx *app.ShowSpaceTemplateContext) error {
	res := &app.SpaceTemplateSingle{}
	err := application.Transactional(c.db, func(appl application.Application) error {
		st, err := appl.SpaceTemplates().Load(ctx, ctx.SpaceTemplateID)
		if err != nil {
			log.Error(ctx, map[string]interface{}{
				"err":               err,
				"space_template_id": ctx.SpaceTemplateID,
			}, "failed to load space template")
			return err
		}
		return ctx.ConditionalRequest(*st, c.config.GetCacheControlSpaceTemplates, func() error {
			res.Data = ConvertSpaceTemplate(appl, ctx.Request, *st)
			return nil
		})
	})
	if err != nil {
		return jsonapi.JSONErrorResponse(ctx, err)
	}
	return ctx.OK(res)
}
143521
func (s *FriendshipService) Show(params *FriendshipShowParams) (*Relationship, *http.Response, error) {
	response := new(RelationshipResponse)
	apiError := new(APIError)
	resp, err := s.sling.New().Get("show.json").QueryStruct(params).Receive(response, apiError)
	return response.Relationship, resp, relevantError(err, *apiError)
}
203832
func (s *ListsService) Show(params *ListsShowParams) (*List, *http.Response, error) {
	list := new(List)
	apiError := new(APIError)
	resp, err := s.sling.New().Get("show.json").QueryStruct(params).Receive(list, apiError)
	return list, resp, relevantError(err, *apiError)
}
174263
func (n Notification) Show() (id uint32, err error) {
	conn, err := dbus.SessionBus()
	if err != nil {
		return
	}

	// We need to convert the interface type of the map to dbus.Variant as
	// people dont want to have to import the dbus package just to make use
	// of the notification hints.
	hints := map[string]dbus.Variant{}
	for k, v := range n.Hints {
		hints[k] = dbus.MakeVariant(v)
	}

	obj := conn.Object(DbusInterfacePath, DbusObjectPath)
	call := obj.Call(
		CallNotify,
		0,
		n.AppName,
		n.ReplacesID,
		n.AppIcon,
		n.Summary,
		n.Body,
		n.Actions,
		hints,
		n.Timeout)
	if err = call.Err; err != nil {
		return
	}

	err = call.Store(&id)
	return
}
477388
func Execute(a *Action) error {
	seen := make(map[*Action]error)
	return execute(seen, a)
}
954159
func (f *FakeWatcher) Action(action EventType, obj runtime.Object) {
	f.result <- Event{action, obj}
}
706978
func (engine *Engine) ShowSQL(show ...bool) {
	engine.logger.ShowSQL(show...)
	if len(show) == 0 {
		engine.showSQL = true
	} else {
		engine.showSQL = show[0]
	}
}
829803
func (c *showCommand) Run(ctx *cmd.Context) (err error) {
	controllerName, err := c.ControllerName()
	if err != nil {
		return err
	}
	url, err := crossmodel.ParseOfferURL(c.url)
	if err != nil {
		store := c.ClientStore()
		currentModel, err := store.CurrentModel(controllerName)
		if err != nil {
			return errors.Trace(err)
		}
		url, err = makeURLFromCurrentModel(c.url, controllerName, currentModel)
		if err != nil {
			return errors.Trace(err)
		}
	}
	if url.Source != "" {
		controllerName = url.Source
	}
	accountDetails, err := c.CurrentAccountDetails()
	if err != nil {
		return err
	}
	loggedInUser := accountDetails.User

	api, err := c.newAPIFunc(controllerName)
	if err != nil {
		return err
	}
	defer api.Close()

	url.Source = ""
	found, err := api.ApplicationOffer(url.String())
	if err != nil {
		return err
	}

	output, err := convertOffers(controllerName, names.NewUserTag(loggedInUser), found)
	if err != nil {
		return err
	}
	return c.out.Write(ctx, output)
}
8322
func (c *WorkitemtypeController) Show(ctx *app.ShowWorkitemtypeContext) error {
	err := application.Transactional(c.db, func(appl application.Application) error {
		witModel, err := appl.WorkItemTypes().Load(ctx.Context, ctx.WitID)
		if err != nil {
			return err
		}
		return ctx.ConditionalRequest(*witModel, c.config.GetCacheControlWorkItemType, func() error {
			witData := ConvertWorkItemTypeFromModel(ctx.Request, witModel)
			wit := &app.WorkItemTypeSingle{Data: &witData}
			return ctx.OK(wit)
		})
	})
	if err != nil {
		return jsonapi.JSONErrorResponse(ctx, err)
	}
	return nil
}
402386
func Display(d, xauthPath string) ServiceOption {
	return func(s *Service) error {
		if s.display != "" {
			return fmt.Errorf("service display already set: %v", s.display)
		}
		if s.xauthPath != "" {
			return fmt.Errorf("service xauth path already set: %v", s.xauthPath)
		}
		if !isDisplay(d) {
			return fmt.Errorf("supplied display %q must be of the format 'x' or 'x.y' where x and y are integers", d)
		}
		s.display = d
		s.xauthPath = xauthPath
		return nil
	}
}
1237999
func (s *SimpleLogger) ShowSQL(show ...bool) {
	if len(show) == 0 {
		s.showSQL = true
		return
	}
	s.showSQL = show[0]
}
607367
func (v GifmsResource) Show(c buffalo.Context) error {
	// Get the DB connection from the context
	tx, ok := c.Value("tx").(*pop.Connection)
	if !ok {
		return errors.WithStack(errors.New("no transaction found"))
	}

	// Allocate an empty Gifm
	gifm := &models.Gifm{}

	// To find the Gifm the parameter gifm_id is used.
	if err := tx.Find(gifm, c.Param("gifm_id")); err != nil {
		return c.Error(404, err)
	}

	return c.Render(200, r.Auto(c, gifm))
}
959894
func (s *Action) showHandleRevision(ctx context.Context, c *cli.Context, name, key, revision string) error {
	sec, err := s.Store.GetRevision(ctx, name, revision)
	if err != nil {
		return s.showHandleError(ctx, c, name, false, err)
	}

	return s.showHandleOutput(ctx, name, key, sec)
}
1239089
func (c *OpenidConfigurationController) Show(ctx *app.ShowOpenidConfigurationContext) error {

	issuer := rest.AbsoluteURL(ctx.RequestData, "", nil)
	authorizationEndpoint := rest.AbsoluteURL(ctx.RequestData, client.AuthorizeAuthorizePath(), nil)
	tokenEndpoint := rest.AbsoluteURL(ctx.RequestData, client.ExchangeTokenPath(), nil)
	userinfoEndpoint := rest.AbsoluteURL(ctx.RequestData, client.ShowUserinfoPath(), nil)
	logoutEndpoint := rest.AbsoluteURL(ctx.RequestData, client.LogoutLogoutPath(), nil)
	jwksURI := rest.AbsoluteURL(ctx.RequestData, client.KeysTokenPath(), nil)

	authOpenIDConfiguration := &app.OpenIDConfiguration{
		// REQUIRED properties
		Issuer:                 &issuer,
		AuthorizationEndpoint:  &authorizationEndpoint,
		TokenEndpoint:          &tokenEndpoint,
		EndSessionEndpoint:     &logoutEndpoint,
		ResponseTypesSupported: []string{"code"},
		JwksURI:                &jwksURI,

		// subject_types_supported REQUIRED. JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include pairwise and public.
		// A Subject Identifier is a locally unique and never reassigned identifier within the Issuer for the End-User, which is intended to be consumed by the Client.
		// http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes
		// subject ==  identity
		SubjectTypesSupported: []string{"public"},
		// id_token_signing_alg_values_supported REQUIRED. JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].
		// The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow).
		IDTokenSigningAlgValuesSupported: []string{"RS256"},

		// RECOMMENDED properties
		UserinfoEndpoint: &userinfoEndpoint,
		ScopesSupported:  []string{"openid", "offline_access"},
		ClaimsSupported:  []string{"sub", "iss", "auth_time", "name", "given_name", "family_name", "preferred_username", "email"},

		// OPTIONAL properties
		GrantTypesSupported: []string{"authorization_code", "refresh_token", "client_credentials"},
		// client_secret_post for client_credentials grant_type
		// client_secre_jwt for authorizatoin_code grant_type
		TokenEndpointAuthMethodsSupported: []string{"client_secret_post", "client_secret_jwt"},
		// response_modes_supported
	}

	return ctx.OK(authOpenIDConfiguration)
}
513651
func (s *AdmpubLogger) ShowSQL(show ...bool) {
	if len(show) == 0 {
		s.showSQL = true
		return
	}
	s.showSQL = show[0]
}
376024
func (s *UserService) Show(params *UserShowParams) (*User, *http.Response, error) {
	user := new(User)
	apiError := new(APIError)
	resp, err := s.sling.New().Get("show.json").QueryStruct(params).Receive(user, apiError)
	return user, resp, relevantError(err, *apiError)
}
304733
func (c *showCommand) Run(ctx *cmd.Context) error {
	if err := c.validateIaasController(c.Info().Name); err != nil {
		return errors.Trace(err)
	}
	if c.Log != nil {
		if err := c.Log.Start(ctx); err != nil {
			return err
		}
	}
	client, err := c.NewAPIClient()
	if err != nil {
		return errors.Trace(err)
	}
	defer client.Close()

	result, err := client.Info(c.ID)
	if err != nil {
		return errors.Trace(err)
	}

	c.dumpMetadata(ctx, result)
	return nil
}